Results 1 to 6 of 6
Thread: Update dom from xml
Oct 4, 2007, 03:28 #1
- Join Date
- Nov 2005
- 0 Post(s)
- 0 Thread(s)
Update dom from xml
I have written some code that is meant to parse an xml file and put the elements from the xml dom to the document's dom. I thought it might be as easy as saying
document.getElementById('replaceme').innerHTML = ''; document.getElementById('replaceme').appendChild(xmlNode);
I have noticed a strange behaviour with short tags, where the firstChild.data is empty. If I put a single space and have the full tag, it works ok.
single space added ( correct behaviour )
Empty tags ( no space )
Any help is greatly appreciated, as it will greatly enhance my potential with OOP PHP if I can get it to work properly.