我有 xml 我想按原样复制(检查 xmlns="" 和标签。我想按原样创建。
总计算是小心的。只有这个问题。它是有效的。仍然客户希望预期的格式是这样的。非常感谢任何帮助。三项任务
1)我需要添加命名空间员工 xmnls="1.2" xmlns:xsi="3" xsi:schemalocation="4"> 2)在输出 xml 中生成这样的标签不是 3)需要避免 xmlns=""
任何提前帮助非常感谢 rameshkumar singh
输入.xml
<Employees>
<employee>
<dept>1</dept>
<sec></sec>
</employee>
<employee>
<dept>2</dept>
<sec></sec>
</employee>
</Employees>
Expected.XML
<Employees xmnls="1.2" xmlns:xsi="3" xsi:schemalocation="4">
<totalemp>2</totalemp>
<employee>
<dept>1</dept>
<sec></sec>
<employee>
<employee>
<dept>2</dept>
<sec></sec>
<employee>
</Employees>
actual.XML
<Employees>
<totalemp>2</totalemp>
<employee xmlns="">
<dept>1</dept>
<sec/>
</employee>
<employee>
<dept>2</dept>
<sec/>
<employee>
</Employees>