On Tue, Feb 24, 2009 at 9:51 AM, Merlin Morgenstern <merlin_x@xxxxxxxxxxx> 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: http://us3.php.net/manual/en/intro.simplexml.php Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php