xsd - Does XML care about the order of elements? -
xml confuses me sometimes, i'm trying figured out. vendor telling me doesn't make sense again, xml , don't along :)
i have xml i'm sending vendor's web service giving me random failures:
<root> <request> <driver id="1" vehid="1">...</driver> <driver id="2" vehid="1">...</driver> <driver id="3" vehid="2">...</driver> <vehicle id="1">...</vehicle> <vehicle id="2">...</vehicle> <driver id="4" vehid="2">...</driver> </request> </root>
there no xslt or xsd compare against see if xml valid.
the vendor states xml invalid because driver #4 in wrong area. xpath driver should root/request/driver , vehicle root/request/vehicle.
is common xml parsers force element order, if there no xsd compare xml to? vendor's support slow me, want know common practice is.
followup
i complained enough our account rep not being able test (and made sound trying support money) turns out developers have xsd, support doesn't. had been talking wrong group *facepalm*
i got xsd, , enforce specific order of elements.
now fight them in regards own sample xml doesn't follow schema, @ least have test against.
if there no xsd (xml schema) @ hand, can check whether or not xml formed.
in case - is. there no overlapping xml tags, no xml tag left open or of sort.
if vendor needs enforce things order inside xml, ought provide xsd file - otherwise, "requirements" cannot validated , checked....
Comments
Post a Comment