I use Xerces to create a new XML file with a DOM Node, but when I use class DOMLSSerializer to save it to disk, I found that every node which I created included an empty attribute xmlns=""
For example:
<Test xmlns="">
<ExtRef xmlns="" Name="Val" fir="tt" way="new"/>
</Test>
When I import an XML file into my new XML file, if the other file has an xmlns attribute, every node which I created included its xmlns attribute.
For example:
<Node id="1.00" name="ttt">
<line desc="new" xmlns:ext="http://www.com" />
<rect desc="times" xmlns:ext="http://www.com" ext:eOption="M"/>
</Node>
How can I remove these empty xmlns attributes that were added?
No comments:
Post a Comment