Re: [PHP] Adressing XML Objects

2009-01-09 Thread ceo
Try it with just one "/" at the start of the xpath. "/anbieter/immobilie/..." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Adressing XML Objects

2009-01-08 Thread Andrew Ballard
On Wed, Jan 7, 2009 at 3:10 PM, Merlin Morgenstern wrote: > Hi there, > > I am justing walking my first steps on XML and PHP. As I learned from a > tutorial adressing is very simple: > > echo $xml->anbieter->immobilie->preise->kaufpreis; > > I simply just can't figure out how to adress this struct

Re: [PHP] Adressing XML Objects

2009-01-08 Thread Nathan Rixham
Merlin Morgenstern wrote: ok... it seems that I am doing something fundamentally wrong. I get no output at all with this: $xmlStr = file_get_contents($filename); $xmlelement = new SimpleXMLElement($xmlStr); echo '$xmlelement->xpath("//anbieter/immobilie/anhaenge/anha...@location='INTERN' and

Re: [PHP] Adressing XML Objects

2009-01-08 Thread Nathan Rixham
Merlin Morgenstern wrote: ok... it seems that I am doing something fundamentally wrong. I get no output at all with this: $xmlStr = file_get_contents($filename); $xmlelement = new SimpleXMLElement($xmlStr); echo '$xmlelement->xpath("//anbieter/immobilie/anhaenge/anha...@location='INTERN' and

Re: [PHP] Adressing XML Objects

2009-01-08 Thread Merlin Morgenstern
ok... it seems that I am doing something fundamentally wrong. I get no output at all with this: $xmlStr = file_get_contents($filename); $xmlelement = new SimpleXMLElement($xmlStr); echo '$xmlelement->xpath("//anbieter/immobilie/anhaenge/anha...@location='INTERN' and @gruppe='TITELBILD']/daten/

Re: [PHP] Adressing XML Objects

2009-01-08 Thread Nathan Rixham
Nathan Nobbe wrote: On Thu, Jan 8, 2009 at 4:38 PM, Nathan Rixham > wrote: Nathan Nobbe wrote: On Thu, Jan 8, 2009 at 4:02 PM, Merlin Morgenstern mailto:merli...@fastmail.fm>>wrote: Hello nathan, I am unsing simplexml as

Re: [PHP] Adressing XML Objects

2009-01-08 Thread Nathan Nobbe
On Thu, Jan 8, 2009 at 4:38 PM, Nathan Rixham wrote: > Nathan Nobbe wrote: > >> On Thu, Jan 8, 2009 at 4:02 PM, Merlin Morgenstern > >wrote: >> >> Hello nathan, >>> >>> I am unsing simplexml as it looks really simple :-) However, I could >>> still >>> not figure out how to adress data inside tag

Re: [PHP] Adressing XML Objects

2009-01-08 Thread Nathan Rixham
Nathan Nobbe wrote: On Thu, Jan 8, 2009 at 4:02 PM, Merlin Morgenstern wrote: Hello nathan, I am unsing simplexml as it looks really simple :-) However, I could still not figure out how to adress data inside tags with attributes. For example: bla blub $xml->anhang[intern][titelbild]-

Re: [PHP] Adressing XML Objects

2009-01-08 Thread Nathan Nobbe
On Thu, Jan 8, 2009 at 4:02 PM, Merlin Morgenstern wrote: > Hello nathan, > > I am unsing simplexml as it looks really simple :-) However, I could still > not figure out how to adress data inside tags with attributes. For example: > > >bla blub > > $xml->anhang[intern][titelbild]->data wi

Re: [PHP] Adressing XML Objects

2009-01-08 Thread Merlin Morgenstern
Hello nathan, I am unsing simplexml as it looks really simple :-) However, I could still not figure out how to adress data inside tags with attributes. For example: bla blub $xml->anhang[intern][titelbild]->data will not work. Thank you for any hint. Best regards, Merlin Merli

Re: [PHP] Adressing XML Objects

2009-01-07 Thread Jim Lucas
Jim Lucas wrote: > Merlin Morgenstern wrote: >> Hello Nathan, >> >> I upgraded to PHP 5, so I am using nativ support. >> >> Best regards, Merlin >> >> Nathan Nobbe schrieb: >>> On Wed, Jan 7, 2009 at 1:10 PM, Merlin Morgenstern >>> mailto:merli...@fastmail.fm>> wrote: >>> >>> Hi there, >>> >>>

Re: [PHP] Adressing XML Objects

2009-01-07 Thread Jim Lucas
Merlin Morgenstern wrote: > Hello Nathan, > > I upgraded to PHP 5, so I am using nativ support. > > Best regards, Merlin > > Nathan Nobbe schrieb: >> On Wed, Jan 7, 2009 at 1:10 PM, Merlin Morgenstern >> mailto:merli...@fastmail.fm>> wrote: >> >> Hi there, >> >> I am justing walking my f

Re: [PHP] Adressing XML Objects

2009-01-07 Thread Nathan Nobbe
On Wed, Jan 7, 2009 at 1:42 PM, Merlin Morgenstern wrote: > Hello Nathan, > > I upgraded to PHP 5, so I am using nativ support. > > Best regards, Merlin > please keep replies on-list so others may benefit from the archives. OK, native support; so in php5 you can use DOM or SimpleXML, i assume y

Re: [PHP] Adressing XML Objects

2009-01-07 Thread Merlin Morgenstern
Hello Nathan, I upgraded to PHP 5, so I am using nativ support. Best regards, Merlin Nathan Nobbe schrieb: On Wed, Jan 7, 2009 at 1:10 PM, Merlin Morgenstern mailto:merli...@fastmail.fm>> wrote: Hi there, I am justing walking my first steps on XML and PHP. As I learned from a tu

Re: [PHP] Adressing XML Objects

2009-01-07 Thread Nathan Nobbe
On Wed, Jan 7, 2009 at 1:10 PM, Merlin Morgenstern wrote: > Hi there, > > I am justing walking my first steps on XML and PHP. As I learned from a > tutorial adressing is very simple: > > echo $xml->anbieter->immobilie->preise->kaufpreis; this is meaningless unless we know which xml library you a

[PHP] Adressing XML Objects

2009-01-07 Thread Merlin Morgenstern
Hi there, I am justing walking my first steps on XML and PHP. As I learned from a tutorial adressing is very simple: echo $xml->anbieter->immobilie->preise->kaufpreis; I simply just can't figure out how to adress this structure: This does not work: echo $xml->anbieter->immobilie->anhaenge->