Unknown character read from XmlFragmentStream

Topics: User Forum
Jan 2, 2007 at 12:00 PM
I'm using the XmlFragmentStream to add a fake root element. However, when reading the file, immediately after the root node, an unknown character is read, displayed as an empty block. This gives a problem when validating my xml, since the validator assumes that the node contains text, while this isn't allowed by my xml schema. Any hints on how to solve this would be greatly appreciated.
Feb 12, 2007 at 2:17 AM
In general, you can use an XmlReader set with an XmlReaderSetting.ConformanceLevel = ConformanceLevel.Fragment.

XmlFragmentStream will probably be deprecated in the near future.
Which is your scenario that forbids the usage of XmlReader as mentioned above?