Re: SimpleXML node detection.
| From: | Gerben | Date: | Wed, 24 Mar 2004 18:37:39 +0000 |
| Subject: | Re: SimpleXML node detection. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-181387@lists.php.net to get a copy of this message | ||
couldn't you use something like. It's a bit more neat
~ <section ignore="true">
~ <name>foo</name>
~ <content>foo</content>
~ </section>
"William Bailey" <wb@pro-net.co.uk> wrote in message
news:40615EDA.5060106@pro-net.co.uk...
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Morning all,
>
> Hopefully a quick question i need to check if a node exists for a
> SimpleXML object but no matter how i try i simple cant find a way to do
> this as it always creates a new object even if the node dosen't exist in
> the xml document.
>
> My peoblem is that i have something like the following xml...
>
> ~ <section>
> ~ <name>foo</name>
> ~ <content>foo</content>
> ~ <ignore />
> ~ </section>
> ~ <section>
> ~ <name>blah</name>
> ~ <content>blah</content>
> ~ </section>
>
> Where there is an ignore tag to specify that i ignore that item
>
> Any ideas on how i can check to see it the ignore node exists or not?
>
>
> - --
> Regards,
> William Bailey.
> Pro-Net Internet Services Ltd.
> http://www.pro-net.co.uk/
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.1 (MingW32)
> Comment: Using GnuPG with Thunderbird - ‰-
> ¬~
(»!1�DÁ³X¿http://enigmail.mozdev.org
>
> iD8DBQFAYV7azSfrYDJMXmERAlSQAJ40wLIRmbSy0vKy0bdLSqU/JGnqbACfd/Hc
> 114wFBzKu+Z6JvsosvuRKBA=
> =lhbH
> -----END PGP SIGNATURE-----