<s>
XML	B-Protocol
documents	I-Protocol
have	O
a	O
hierarchical	O
structure	O
and	O
can	O
conceptually	O
be	O
interpreted	O
as	O
a	O
tree	O
structure	O
,	O
called	O
an	O
XML	B-Language
tree	I-Language
.	O
</s>
<s>
XML	B-Protocol
documents	I-Protocol
must	O
contain	O
a	O
root	O
element	O
(	O
one	O
that	O
is	O
the	O
parent	O
of	O
all	O
other	O
elements	O
)	O
.	O
</s>
<s>
All	O
elements	O
in	O
an	O
XML	B-Protocol
document	I-Protocol
can	O
contain	O
sub	O
elements	O
,	O
text	O
and	O
attributes	O
.	O
</s>
<s>
The	O
tree	O
represented	O
by	O
an	O
XML	B-Protocol
document	I-Protocol
starts	O
at	O
the	O
root	O
element	O
and	O
branches	O
to	O
the	O
lowest	O
level	O
of	O
elements	O
.	O
</s>
<s>
Although	O
there	O
is	O
no	O
consensus	O
on	O
the	O
terminology	O
used	O
on	O
XML	B-Language
Trees	I-Language
,	O
at	O
least	O
two	O
standard	O
terminologies	O
have	O
been	O
released	O
by	O
the	O
W3C	O
:	O
</s>
<s>
The	O
terminology	O
used	O
in	O
the	O
XML	B-Protocol
Information	O
Set	O
.	O
</s>
<s>
XPath	B-Language
defines	O
a	O
syntax	O
named	O
XPath	B-Language
expressions	O
that	O
identifies	O
one	O
or	O
more	O
internal	O
components	O
(	O
elements	O
,	O
attributes	O
,	O
etc	O
.	O
)	O
</s>
<s>
of	O
an	O
XML	B-Protocol
document	I-Protocol
.	O
</s>
<s>
XPath	B-Language
is	O
widely	O
used	O
to	O
accesses	O
XML-encoded	O
data	O
.	O
</s>
<s>
The	O
XML	B-Protocol
Information	O
Set	O
,	O
or	O
XML	B-Protocol
infoset	O
,	O
describes	O
an	O
abstract	O
data	O
model	O
for	O
XML	B-Protocol
documents	I-Protocol
in	O
terms	O
of	O
information	O
items	O
.	O
</s>
<s>
It	O
is	O
often	O
used	O
in	O
the	O
specifications	O
of	O
XML	B-Protocol
languages	O
,	O
for	O
its	O
convenience	O
in	O
describing	O
constraints	O
on	O
constructs	O
those	O
languages	O
allow	O
.	O
</s>
<s>
The	O
XML	B-Protocol
specification	I-Protocol
defines	O
an	O
XML	B-Protocol
document	I-Protocol
as	O
a	O
well-formed	O
text	O
if	O
it	O
satisfies	O
a	O
list	O
of	O
syntax	O
rules	O
defined	O
in	O
the	O
specification	O
.	O
</s>
<s>
This	O
specification	O
is	O
long	O
,	O
however	O
2	O
key	O
points	O
relating	O
to	O
the	O
tree	O
structure	O
of	O
an	O
XML	B-Protocol
document	I-Protocol
are	O
:	O
</s>
<s>
XML	B-Protocol
has	O
appeared	O
as	O
a	O
first-class	O
data	O
type	O
in	O
other	O
languages	O
.	O
</s>
<s>
The	O
JavaScript	O
(	O
E4X	O
)	O
extension	O
explicitly	O
defines	O
two	O
specific	O
objects	O
(	O
XML	B-Protocol
and	O
XMLList	O
)	O
,	O
which	O
support	O
XML	B-Protocol
document	I-Protocol
nodes	O
and	O
XML	B-Protocol
node	O
lists	O
as	O
distinct	O
objects	O
and	O
use	O
a	O
dot-notation	O
specifying	O
parent-child	O
relationships	O
.	O
</s>
<s>
These	O
data	O
structures	O
represent	O
XML	B-Protocol
documents	I-Protocol
as	O
a	O
tree	O
structure	O
.	O
</s>
<s>
An	O
XML	B-Language
Tree	I-Language
represented	O
graphically	O
can	O
be	O
as	O
simple	O
as	O
an	O
ASCII	O
chart	O
or	O
a	O
more	O
graphically	O
complex	O
hierarchy	O
.	O
</s>
<s>
For	O
instance	O
,	O
the	O
XML	B-Protocol
document	I-Protocol
and	O
the	O
ASCII	O
tree	O
have	O
the	O
same	O
structure	O
.	O
</s>
<s>
XML	B-Language
Trees	I-Language
do	O
not	O
show	O
the	O
content	O
in	O
an	O
Instance	O
document	O
,	O
only	O
the	O
structure	O
of	O
the	O
document	O
.	O
</s>
<s>
XPath	B-Language
,	O
the	O
XML	B-Language
Path	I-Language
Language	I-Language
,	O
is	O
a	O
query	O
language	O
for	O
selecting	O
nodes	O
from	O
an	O
XML	B-Protocol
document	I-Protocol
.	O
</s>
<s>
XPath	B-Language
defines	O
a	O
syntax	O
named	O
XPath	B-Language
expressions	O
that	O
can	O
query	O
an	O
XML	B-Protocol
document	I-Protocol
for	O
one	O
or	O
more	O
internal	O
components	O
(	O
elements	O
,	O
attributes	O
,	O
etc	O
.	O
)	O
.	O
</s>
<s>
XPath	B-Language
is	O
widely	O
used	O
in	O
other	O
core-XML	O
specifications	O
and	O
in	O
programming	O
libraries	O
for	O
accessing	O
XML-encoded	O
data	O
.	O
</s>
<s>
The	O
XPath	B-Language
Data	O
Model	O
is	O
a	O
long	O
specification	O
,	O
and	O
goes	O
into	O
many	O
features	O
unrelated	O
to	O
XML	B-Language
trees	I-Language
.	O
</s>
<s>
Listed	O
below	O
are	O
key	O
terms	O
from	O
that	O
specification	O
and	O
the	O
XML	B-Protocol
specification	I-Protocol
.	O
</s>
<s>
It	O
must	O
conform	O
to	O
naming	O
rules	O
of	O
XML	B-Protocol
objects	O
.	O
</s>
<s>
must	O
start	O
with	O
a	O
letter	O
or	O
underscore	O
,	O
case-sensitive	O
,	O
cannot	O
start	O
with	O
the	O
letters	O
xml(in any case )	O
,	O
can	O
contain	O
letters	O
,	O
digits	O
,	O
hyphens	O
,	O
underscores	O
,	O
and	O
periods	O
,	O
cannot	O
contain	O
spaces	O
.	O
)	O
</s>
<s>
XML	B-Protocol
Information	O
Set	O
(	O
XML	B-Protocol
Infoset	O
)	O
describes	O
an	O
abstract	O
data	O
model	O
of	O
an	O
XML	B-Protocol
document	I-Protocol
in	O
terms	O
of	O
a	O
set	O
of	O
information	O
items	O
.	O
</s>
<s>
The	O
definitions	O
in	O
the	O
XML	B-Protocol
Information	O
Set	O
specification	O
are	O
meant	O
to	O
be	O
used	O
in	O
other	O
specifications	O
that	O
need	O
to	O
refer	O
to	O
the	O
information	O
in	O
a	O
well-formed	O
XML	B-Protocol
document	I-Protocol
.	O
</s>
<s>
The	O
infoset	O
makes	O
it	O
convenient	O
to	O
describe	O
constraints	O
on	O
the	O
XML	B-Protocol
constructs	O
other	O
XML	B-Protocol
languages	O
allow	O
.	O
</s>
<s>
An	O
XML	B-Protocol
document	I-Protocol
has	O
an	O
information	O
set	O
if	O
it	O
is	O
well-formed	O
and	O
satisfies	O
the	O
namespace	O
constraints	O
.	O
</s>
<s>
The	O
XML	B-Protocol
Information	O
Set	O
is	O
a	O
long	O
specification	O
,	O
and	O
goes	O
into	O
many	O
features	O
unrelated	O
to	O
XML	B-Language
trees	I-Language
.	O
</s>
<s>
Listed	O
below	O
are	O
the	O
most	O
important	O
terms	O
relating	O
to	O
XML	B-Language
tree	I-Language
terminology	O
:	O
</s>
<s>
There	O
is	O
an	O
element	O
information	O
item	O
for	O
each	O
element	O
appearing	O
in	O
the	O
XML	B-Protocol
document	I-Protocol
.	O
</s>
