I'm wondering how does XML namespaces work. I read they should be unique etc. But none of resources stated how they exactly work.
What I mean i have XML node like
<name xml:lang="en" type="abc">A name</name>
And to extract xml:lang
with php (SimpleXML) i need to use following code:
$obj->attributes('http://www.w3.org/XML/1998/namespace');
How does this link define/tell SimpleXML to extract xml:*
attributes? I Only see web page there, not single definition that would define this namespace.
As How do XML namespaces work states URLs are never resolved. But document i parse does not contain this link (namespace definition).
Also, in question above, there are defined namespaces. Where they define that this namespace is exactly human:*
?