DOMDocument


Posted on 16th Feb 2014 07:03 pm by admin

Hello All,

I need to take an XML document, modify some of the nodes in it and then perform a selective reordering of a subset of nodes. The modification I have done without too much difficulty - extracting the current node as nodeValue, operating on the nodeValue to generate a new node with the desired structure and then replaceChild to replace the old node.

Did you know?Explore Trending and Topic pages for more stories like this.
However, when I looked at reordering I hit a stumbling block. Much to my surprise I found that there appear to be no methods of DOMNode/DOMElement/DOMDocument to help me do the reordering. I thought I would first take out the nodes that require reordering and then add them back in. And then I found that on my local installation (PHP 5.2) last_child and lastChild both produced error messages.

Am I barking up the wrong tree here? Do I need to look at something other than DOMDocument? I'd hugely appreciate any help
No comments posted yet

Your Answer:

Login to answer
237 Like 54 Dislike
Previous forums Next forums
Other forums

query help
Hi experts.

i have a table rep2 like this
PROD_COD ACCT_NO DUE_DAYS BALANCE

array_count_values question?
ok i'm trying to create a top ten list from a database of listed favorite movies.

the followi

php slowing my site?
Hi all,

I think that one of the reasons that my site doesn't work fast is that the code is ve

Converting from one format to another
"I have got a date in DD/MM/YYYY but I need it in MM-DD-YYYY. Help!"

Supress some serveroutput but not all
Hi,

I have a script I'm working on that uses plsql to create and RMAN script, this uses d

Where am I going wrong
Been trying to work this out for hours

I have two tables called 'Genres' and 'Films'. Genre

Lack of simpleXML Documentation
What is up with this.

Look at: http://www.php.net/manual/en/function.simplexml-load-file.php<

Number Format
Hi All,

I have number '000000000050085' I want to format it to 500.85 Can any one give me

ALV List Display to point to another report on Double Click
Hi,

I want my ALV List Display to point to another report on Double Click on its line ite

Filtering for a phrase using pregmatch
Here is my code which looks for addresses which start with ' src=" '

Code: [Select]preg_

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash