hello,
i am using _xmldomwrapper and i have encountered a problem with my xml:
xml is:
Now i want to insert child node to /envelope/table/att08
Now here is the poblem if i use code like this:
Node is not inserted because no node is selected ... xpath is wrong right?
Now with this code it "works" node gets selected and child is inserted:
But its inserted with attribute:
Output should be:
can someone exqaplin to me whats wrong with my code?
i am using _xmldomwrapper and i have encountered a problem with my xml:
xml is:
<?xml version="1.0" encoding="utf-8"?> <Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:edp="http://mydocs/Documents/Schemas/EDP-Common-1.xsd" xmlns="http://mydocs/Documents/Schemas/schema_8.xsd"> <table> <att08> </table> </att08>
Now i want to insert child node to /envelope/table/att08
Now here is the poblem if i use code like this:
[ autoit ]
#include<_XMLDomWrapper.au3> $origin_xml = @ScriptDir & "\" & "tax_2013.xml" $xml_open_origin = _XMLFileOpen($origin_xml,'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:edp="http://mydocs/Documents/Schemas/EDP-Common-1.xsd" xmlns="http://mydocs/Documents/Schemas/DOD_DDPO_8.xsd"') _XMLCreateChildNode("/Envelope/body/DOD_DDPO/Att08","TableA")
Node is not inserted because no node is selected ... xpath is wrong right?
Now with this code it "works" node gets selected and child is inserted:
[ autoit ]
#include<_XMLDomWrapper.au3> $origin_xml = @ScriptDir & "\" & "tax_2013.xml" $xml_open_origin = _XMLFileOpen($origin_xml,'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:edp="http://mydocs/Documents/Schemas/EDP-Common-1.xsd" xmlns:test="http://mydocs/Documents/Schemas/DOD_DDPO_8.xsd"') _XMLCreateChildNode("/test:Envelope/test:body/test:DOD_DDPO/test:Att08","TableA")
But its inserted with attribute:
<TableA xmlns=""/>
Output should be:
<?xml version="1.0" encoding="utf-8"?> <Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:edp="http://mydocs/Documents/Schemas/EDP-Common-1.xsd" xmlns="http://mydocs/Documents/Schemas/schema_8.xsd"> <table> <att08> </TableA> </table> </att08>
can someone exqaplin to me whats wrong with my code?