[REBOL] Re: ANN: xml-object.r , and...a question about REBOL's built-in parse-x
From: gavin:mckenzie:sympatico:ca at: 5-Oct-2001 8:28
Hi Joel,
I think we've misunderstood each other. I should have included an example
with my comments as clarification; sorry.
Nested structures with repeating names are absolutely ok.
What I was referring to is the following:
<foo bar="something">
<bar>something</bar>
</foo>
In that example foo has both a child element named 'bar' and an attribute
named 'bar'. While it is perfectly legal to do this, it is considered (by
many) to be poor form because it makes the representation of the XML in
objects and exposure into scripting engines (such as Active Scripting or
some other script engine) problematic.
The xml-object.r script doesn't handle the above case very well.
What you were referring to is doing something like:
<foo>
<bar>something</bar>
<bar>something</bar>
</bar>
</foo>
And of course, this is ok -- in fact it is extremely useful. The ability to
represent repeating nested or 'recursive' structures is a very important
capability, as you rightly point out. And, I'm happy to say, xml-object.r
handles it ok too.
Gavin.