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

Search with relational database
Hey,

I have quite a complicated (for me anyway ) relational database for an apartments syste

Please Help my PHP Dating Function.
Hi everyone!

Well here is my code that displays this:

It works wonderful.


Track downloads' status
Hello,

I need to make somehow, some system, to track whether downloads are completed or faile

session variables not working anymore
hello,
i use sessions to handle authentication within my site. my host has been changing a lot of

PHP using IF to display error
i have a MySQL query and i want to display 1 thing only if the number of affected rows is >=1

While Problem
i am having a problem with a while statement here is the code
Code: [Select]<?php
sess

Apart from cron
I need to run a php file every one hour. Is there any other solution apart from cron job?

Reduce redundancies in switch functions?
Hello all! I somewhat new to PHP, and was wondering if anyone could give some suggestions on a swit

Cannot Display Array from Select Statement + Login question
Hi,
I'm new to PHP but so far so goog. I was assigend a project and I'm very close to completion.

SAP Project Module
I have seen in the SAP Project Module,plan cost and budget are not equal and even difference is sign

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