Should I be able to do this in an XML schema?
<POT_EXAM_SCORE>
<POT_EXAM_SCORE>1234</POT_EXAM_SCORE>
</POT_EXAM_SCORE>
As written, I do not get any data for POT_EXAM_SCORE, and do only if I give the lower level element a unique name. Can this be made to work as written?
[QUOTE=Fiddle Peghead]
Should I be able to do this in an XML schema?
<POT_EXAM_SCORE>
<POT_EXAM_SCORE>1234</POT_EXAM_SCORE>
</POT_EXAM_SCORE>
As written, I do not get any data for POT_EXAM_SCORE, and do only if I give the lower level element a unique name. Can this be made to work as written?
[/QUOTE]
Why are you nesting identical elements?
You can do it if you’re willing to write your own XML parser, but it sure seems like it’d be a lot simpler to just give the outer tag a different name (POT_EXAM_SCORES, perhaps?).
I’m not writing them, I’m only using them. I’m new to XML and want to look like I know what I’m talking about when I speak with those who will have to make changes.
Thanks.
[QUOTE=Fiddle Peghead]
Should I be able to do this in an XML schema?
<POT_EXAM_SCORE>
<POT_EXAM_SCORE>1234</POT_EXAM_SCORE>
</POT_EXAM_SCORE>
As written, I do not get any data for POT_EXAM_SCORE, and do only if I give the lower level element a unique name. Can this be made to work as written?
[/QUOTE]
How are you parsing this XML data? That is, when you say, “I do not get any data for…”, how are you “getting” the data? Is there a custom application stepping through it? Are you feeding it into an XSL stylesheet?
I don’t recall anything in the XML spec that prohibits people from nesting elements with identical names. That being said, I can’t think of a single reason why anyone would want to do that, anyway - it only clouds up the schema (as toadspittle and ultrafilter had mentioned).
LilShieste