You are here: Re: [PHP] Impossible to list attributes of xml-element? « PHP « IT news, forums, messages
Re: [PHP] Impossible to list attributes of xml-element?

Posted by Christian Stocker on 05/26/05 22:38

On 5/26/05, Victor Spång Arthursson <victor@tosti.dk> wrote:
> Ciao!
>
> I'm selecting an element in the xml using xpath. I know there is only
> one element matching the xpath-query, but still I get the result as a
> list. Nevermind.
>
> This list is of the type domnodelist, on which only one action is
> allowed: item()
>
> Selecting [xpath-result]->item(0) gives me the only element in the
> result in the form of a domelement. This domelement should have a lot
> of attributes, but I cant find no way to get some kind of list over
> those attributes, to work further with.
>
> Could someone please point me in the same direction?

$domelement->attributes

gives you a DomNodeList back with all attributes

chregu
>
> Sincerely
>
> Victor
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--
christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich
phone +41 1 240 56 70 | mobile +41 76 561 88 60 | fax +41 1 240 56 71
http://www.bitflux.ch | chregu@bitflux.ch | gnupg-keyid 0x5CE1DECB

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация