I want to bypass the dtd validation that child elements must appear in
a certain order ...
In a DTD child elements that are defined and seperated by commas they
must appear in the same sequence in an xml file in order for the xml to
be valid ...
eg if the dtd defines an element Parent with two child nodes
<!ELEMENT Parent (a, b)>
Then the following xml is valid
<Parent>
<a>data</a>
<b>data</b>
</Parent>
but the following xml
<Parent>
<b>data</b>
<a>data</a>
</Parent>
is invalid ...
Does anyone know of any ways to get around this issue ??? I have
developed an application that generates xml but the child nodes aren't
created in the same order as specified in the dtd and I want to
validate the xml document ...
I am currently using the XMLReader class to try to validate the xml
..Net framework 2.0
XmlReaderSettings settings = new XmlReaderSettings();
settings.ProhibitDtd = false;
settings.ValidationType = ValidationType.DTD;
settings.ValidationEventHandler += new
ValidationEventHandler(ValidationCallBack);
settings.CheckCharacters = false;
settings.DtdValidate = true;
settings.IgnoreValidationWarnings = true;
XmlReader reader = XmlReader.Create(_filename, settings);
while (reader.Read()) ;
Many Thanks