I have following code.
<entry>
<job:location>
<job:id>24</job:id>
<job:region>6</job:region>
</job:location>
</entry>
I've problem with namespaces. How I can read content of job:region tag in SimpleXML.
I have following code.
<entry>
<job:location>
<job:id>24</job:id>
<job:region>6</job:region>
</job:location>
</entry>
I've problem with namespaces. How I can read content of job:region tag in SimpleXML.
You should register the job namespace, then you can use the registered namespace-prefix in an XPath to select what you want:
Try this:
To check the above code in action, click here
For more information about SimpleXml refer to this article
I would do it dynamically.