Re: XML namespace / element name question
- From: William Park <opengeometry@xxxxxxxx>
- Date: Sun, 17 Jul 2005 21:35:08 -0400
ByteCoder <me@xxxxxxxx> wrote:
> 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?
They both well-formed.
--
William Park <opengeometry@xxxxxxxx>, Toronto, Canada
ThinFlash: Linux thin-client on USB key (flash) drive
http://home.eol.ca/~parkw/thinflash.html
BashDiff: Super Bash shell
http://freshmeat.net/projects/bashdiff/
.
- Prev by Date: Re: XSLT: best practice for several similar templates
- Next by Date: Re: XML namespace / element name question
- Previous by thread: XSLT: best practice for several similar templates
- Next by thread: Re: XML namespace / element name question
- Index(es):
Relevant Pages
|