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.

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

ASP.NET Validation Event Cycle
Hi,
I have asp button as follow:

Images outside webroot
Im hopeing someone can help me with this because i cant figure it out.I have setup an ASP.NET websit

Change of partner analyse in sales orders
Hello,

I changed the partner analyse for sales orders and added a new mandatory partnerro

values in array being escaped
I would like to submit some values - back to the same form for checking before processing...

Splitting Attributes
SQL> SELECT I_NAME, substr(I_NAME,1,instr(I_NAME,'O')) "First part",

substr(I_NAME, IN

I got my hosting suspended XD
So I saw this challenge a day or so ago

http://www.programming-challenges.com/pg.php?page=dow

frame help
on the bottom frame is menu.html

Code: <body><form action='link.php' met

How to sum these output values
Hi

I need sum the month totals
SELECT region_name, area_name ,SUM (CASE WHEN S

How to show more than 1 users with this code...
Hello,
i have a table that shows users only if I, as Administrator, want to be shown. But its sho

How to store checkbox array in a session, and then be able to add to it?
I'm trying to store an array of checkbox values into a session array, sort of like a shopping cart,

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