B
ByteCoder
I just have a probably simple XML question, but I just can't find an
answer to it:
It seems that two sibling elements, which are in the same namespace, may
not have the same name (tag name). Is this correct? If yes, should my
parser return an error when it sees this?
An example:
<?xml version="1.0" encoding="UTF-8"?>
<root>
<sub1>dskjh</sub1>
<sub2>haskjh</sub2>
<sub2>xzjg</sub2>
</root>
Am I correct to assume the above code is *not* well formed?
<?xml version="1.0" encoding="UTF-8"?>
<root>
<root>
</root>
</root>
I suspect that the above code is well formed, but is it? In other words:
Does XML allow this kind of redundancy?
Thanks for your help.
--
answer to it:
It seems that two sibling elements, which are in the same namespace, may
not have the same name (tag name). Is this correct? If yes, should my
parser return an error when it sees this?
An example:
<?xml version="1.0" encoding="UTF-8"?>
<root>
<sub1>dskjh</sub1>
<sub2>haskjh</sub2>
<sub2>xzjg</sub2>
</root>
Am I correct to assume the above code is *not* well formed?
<?xml version="1.0" encoding="UTF-8"?>
<root>
<root>
</root>
</root>
I suspect that the above code is well formed, but is it? In other words:
Does XML allow this kind of redundancy?
Thanks for your help.
--