Help on reading a XML document (part of it)

Hello all,

:slight_smile:


<renew>
        <domain:renew xmlns:domain="urn:ietf:params:xml:ns:domain-1.0" xsi:schemaLocation="urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd">
          <domain:name>example.pt</domain:name>
          <domain:curExpDate>2008-04-03</domain:curExpDate>
        </domain:renew>
</renew>

Assuming that:
“renew” is a node.
“domain” is a namespace and, at the same time, a prefix of renew.

Is “domain” child of “renew” ?

What are “name” and “curExpDate” ?

2.1) Are they childs of the namespace?

Thanks a lot,
Márcio

After reading some articles about namespace, here we go:

Yes it is.

No. “domain” is a prefix bound to a given namespace.


xmlns:domain="urn:ietf:params:xml:ns:domain-1.0"

So, we are using the “xmlns” attribute to give our “domain” prefix a qualified namespace reached by a given uri: "

urn:ietf:params:xml:ns:domain-1.0;

"

What is a namespace? I have no idea. And the documentation don’t clarify:
[URL=“http://www.w3.org/TR/REC-xml-names/”]http://www.w3.org/TR/REC-xml-names/

:frowning:

No. “domain” is a prefix bound to a given namespace.
That namespace has a namespace binding provided by a URI that, seems(?) to have some sintax inside.

Those are elements (nodes) defined on the namespace I’m not yet sure if they are elements inside the declaration, or somekind of attributes of a given name space that we access by using :

urn:ietf:params:xml:ns:domain-1.0

There’s no such think as childs of namespace. The 2) answers this.

Please, if the above IS NOT precise, let me know. :smiley: Please.
Márcio