Hi there, I have an interesting problem that maybe you pros can suggest how I solve.
I'm working with a third party program that serializes an XML document (it was obviously not designed with schema in mind). I created a schema from this document. It works fine. Except for some unknown reason, in a small part of the XML document, this program switches the order around, and of course the validator I built then fails.
Its always the same two elements it switches (from top to bottom and bottom to top)
ex:
Some documents have the metaID on top, some on the bottom, these are the only two elements that ever get switched.
I need my validator program to handle both of the below document types and not throw errors.
Some documents are:
<Metadata>
<MetaID>{65C97878-11D5-4599-B5AD-7C5BFB9B591D}</MetaID>
<CreaDate>20040223</CreaDate>
<CreaTime>08552300</CreaTime>
<SyncOnce>FALSE</SyncOnce>
<SyncDate>20040225</SyncDate>
<SyncTime>10445400</SyncTime>
<ModDate>20040225</ModDate>
<ModTime>10445400</ModTime>
</Metadata>
Some are:
<Metadata>
<CreaDate>20040225</CreaDate>
<CreaTime>09500700</CreaTime>
<SyncOnce>FALSE</SyncOnce>
<SyncDate>20040225</SyncDate>
<SyncTime>10445100</SyncTime>
<ModDate>20040225</ModDate>
<ModTime>10445100</ModTime>
<MetaID>{469F6DEE-4EFF-48E6-9D66-39C0D6776DF2}</MetaID>
</Metadata>
Of course schema by its nature defines the order of child elements. Is there anyway I can force the MetaID element to be ignored? Or should I approach this by adding code to my project to ensure this element is placed first? (as defined in myschema)
I don't know how I should approach this problem.
thanks a bunch!
************************************************** ********************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...