couldn't you use something like. It's a bit more neat ~ <section ignore="true"> ~ <name>foo</name> ~ <content>foo</content> ~ </section>
"William Bailey" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > -----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 - http://enigmail.mozdev.org > > iD8DBQFAYV7azSfrYDJMXmERAlSQAJ40wLIRmbSy0vKy0bdLSqU/JGnqbACfd/Hc > 114wFBzKu+Z6JvsosvuRKBA= > =lhbH > -----END PGP SIGNATURE----- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php