This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Microsoft XML > October 2004 > XML Elements Naming
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
XML Elements Naming
|
|
| Abhishek 2004-10-29, 12:14 pm |
| Hi All,
I have a doubt regarding XML elements naming.
Let say I have an XML document having an element
called <Area></Area>.
If I add a sub-element to the element <Area> with the
same name for e.g.
<Area>
<Area>
</Area>
</Area>
Is the above structure recommendable?
Will this structure cause any problems while parsing the XML file
using MSXML DOM parser?
Please guide me.
Thanks in advance,
Abhishek.
| |
| Martin Honnen 2004-10-29, 12:14 pm |
|
Abhishek wrote:
> I have a doubt regarding XML elements naming.
> Let say I have an XML document having an element
> called <Area></Area>.
> If I add a sub-element to the element <Area> with the
> same name for e.g.
> <Area>
> <Area>
> </Area>
> </Area>
> Is the above structure recommendable?
It depends on what kind of Area you have in mind and whether the nesting
of such <Area> elements makes sense for the semantic domain you are
modelling with the XML document.
> Will this structure cause any problems while parsing the XML file
> using MSXML DOM parser?
No, there won't be any problems, you simply will have to <Area> elements
in the DOM tree where on is the child of the other.
--
Martin Honnen
http://JavaScript.FAQTs.com/
| |
|
| Arguable, but my personal opinion is No. XML names should represent the
characteristic of the elements and attributes. Not always, but in most
cases, parent and children have different characteristic.
<areas><area/>...</areas>
is reasonable even if it sometimes looks redundant. If you, in some time,
happened to define the structure with XML schema, same names in different
context can raise irrevocable difficulties.
"Abhishek" <abhi_narulkar@rediffmail.com> wrote in message
news:%23CW3c1bvEHA.3200@TK2MSFTNGP14.phx.gbl...
> Hi All,
> I have a doubt regarding XML elements naming.
> Let say I have an XML document having an element
> called <Area></Area>.
> If I add a sub-element to the element <Area> with the
> same name for e.g.
> <Area>
> <Area>
> </Area>
> </Area>
> Is the above structure recommendable?
> Will this structure cause any problems while parsing the XML file
> using MSXML DOM parser?
>
> Please guide me.
> Thanks in advance,
> Abhishek.
>
>
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|