TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 11-01-2009, 01:39 PM   #1 (permalink)
The Wanderer
 
nuweb's Avatar
 
Join Date: Nov 2008
Location: Yorkshire, England
Posts: 8
Thanks: 1
nuweb is on a distinguished road
Default Get PHP Dom value, when creating XML

Hello All,

I have created a little API that allows me to design a mysql query and it builds an XML document for me, useing PHP dom.

It works well, except I need to get the Value of an element created by the dom. ( so another query can be made, from its value).

Here is the END xml document.

I need to get the value of xmlz->category->cat_id so that I use it for the query to get each xmlz->items.

I keep reading dom manual, but everything I try has no success yet.
Thanks in advance.
__________________
NuWeb
nuweb is offline  
Reply With Quote
Old 11-01-2009, 02:33 PM   #2 (permalink)
The Wanderer
 
nuweb's Avatar
 
Join Date: Nov 2008
Location: Yorkshire, England
Posts: 8
Thanks: 1
nuweb is on a distinguished road
Default

PHP Code:
echo $dom->getElementsByTagName("cat_id")->item(0)->nodeValue
This code works, if theirs no objections I think this will work well.
__________________
NuWeb
nuweb is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
10 PHP Myths Dispelled Wildhoney General 9 06-15-2009 06:55 AM
PHP Compressor Kalle Script Giveaway 8 05-28-2008 12:14 AM
Creating custom php extensions with DevCPP? Nor Advanced PHP Programming 6 01-30-2008 04:49 PM
what are all the subjects in php? sarmenhb General 7 01-21-2008 05:41 PM
Creating a PHP ACL and even Rat out Users using Proxies! Wildhoney General 0 09-22-2007 10:48 AM


All times are GMT. The time now is 02:14 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design