skip to Main Content

Javascript – JS: XML insertBefore createElement

I have an xml payload <myXML> <ctx> <recipient> <CardNumber>1245</CardNumber> <age>16</age> <height>180</height> </recipient> </ctx> </myXML> var xmlDoc = DOMDocument.fromXMLString(message).getElementsByTagName("myXML")[0].toXMLString(); which basically outputs starting from the ctx node. I want to add a new node/element at a specific location using the insertBefore,…

VIEW QUESTION
Back To Top
Search