dotnet / dotnet/dotnet-api-docs

The 2nd sample just doesn't work

Open
#1,111 0 comments 0 reactions 0 assignees View on GitHub
area-System.Xml dotnet-api/prod Pri2 untriaged
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

Put the markup in a file and try to read it in using the 2nd sample's algorithm.

You'll get: System.Xml.XmlException: 'Data at the root level is invalid. Line 1, position 1.'

And there's nothing you can do about it because the message is incompetent.

This validation algorithm just Does Not Work.

---
#### Document Details

⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*

* ID: 197b1557-898f-83e9-cf36-193cee2bf8d5
* Version Independent ID: 05f74140-3b99-3029-5567-9a3a7aed10db
* Content: [Extensions.Validate Method (System.Xml.Schema)](https://docs.microsoft.com/en-us/dotnet/api/system.xml.schema.extensions.validate?view=netframework-4.7.2#System_Xml_Schema_Extensions_Validate_System_Xml_Linq_XAttribute_System_Xml_Schema_XmlSchemaObject_System_Xml_Schema_XmlSchemaSet_System_Xml_Schema_ValidationEventHandler_)
* Content Source: [xml/System.Xml.Schema/Extensions.xml](https://github.com/dotnet/dotnet-api-docs/blob/master/xml/System.Xml.Schema/Extensions.xml)
* Product: **dotnet-api**
* GitHub Login: @dotnet-bot
* Microsoft Alias: **dotnetcontent**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.