suppose I have created a dom like the one below
------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<field><fieldname>field1</fieldname><visible>t</visible></field>
--------------------------------------------
and I want to merge it with another dom with the above dom as a child ie the expected output should be like
------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<blk>
<name> block </name>
<field><fieldname>field1</fieldname><visible>t</visible></field>
</blk>
--------------------------------------------
I'd tried using appendchild(child dom) and importNode(child dom, true) on the child dom but keeps getting error.
any suggestions? maybe there is some API that can perform this operation?
------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<field><fieldname>field1</fieldname><visible>t</visible></field>
--------------------------------------------
and I want to merge it with another dom with the above dom as a child ie the expected output should be like
------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<blk>
<name> block </name>
<field><fieldname>field1</fieldname><visible>t</visible></field>
</blk>
--------------------------------------------
I'd tried using appendchild(child dom) and importNode(child dom, true) on the child dom but keeps getting error.
any suggestions? maybe there is some API that can perform this operation?