The XML I am trying to parse has structure similar to this - where there are colon's in te tag: <person:type>mean</person:type>
Can PHP DomDocument parse such a structure? The usual getElementByTagName does not seem to work
The XML I am trying to parse has structure similar to this - where there are colon's in te tag: <person:type>mean</person:type>
Can PHP DomDocument parse such a structure? The usual getElementByTagName does not seem to work
Sort of, you really want getElementsByTagNameNS
. At the beginning of the document, you might notice something like xmlns:person="http://foo.bar.com"
. That URL would be the first parameter of the method, 'type' would be the second.