On Tue, Feb 24, 2009 at 9:51 AM, Merlin Morgenstern
<merli...@fastmail.fm> wrote:
> Hi there,
> I am trying to pars an XML file with php. This works if the xml tag looks
> like this: <anbieternr>88</anbieternr>
> In that case I retrieve the info: $xml->anbieternr
> But now the tag looks different like this:
> <imo:anbieternr>88</imo:anbieternr>
> The command $xml->imo:anbieternr does not work in that case.
> Has somebody an idea how to adress this?
> Thank you for any help!
> Merlin

Short answer? You probably need to look at using XPath queries in
SimpleXML to get to those elements. Shorter answer? If you have to
deal with namespaces in documents, it's probably time for the project
to graduate from SimpleXML to something like DOM.

Look at the user note on this page:


PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to