homepage Welcome to WebmasterWorld Guest from 54.166.255.168
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
php domDocument check node exists
checking for a node to exist in an xml file using php
liam_85

5+ Year Member



 
Msg#: 3795902 posted 10:22 am on Nov 28, 2008 (gmt 0)

Hello,

This is my first time posting a problem. I would like to check if an element exists in an xml file through php. Does anyone know how to go around this?

 

vincevincevince

WebmasterWorld Senior Member vincevincevince us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3795902 posted 8:41 am on Nov 29, 2008 (gmt 0)

By ID you can do:
DomDocument->get_element_by_id ( string $id )

When it succeeds, then the node exists.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved