How change the XPATH and XML output format in DataStage?

混江龙づ霸主 提交于 2020-01-25 08:04:33

问题


I HAVE some problem in XPATH In XML Output

I Want The Output Like

<categories>
  <category NAME="A">
    <redcord a="1"></redcord>
    <redcord a="2"></redcord>
  </category>
  <category NAME="B">
    <redcord b="ASD"></redcord>
    <redcord b="QWE"></redcord>
  </category>
</categories>

I HAVE XPATH LIKE :

/categories/category[@NAME="A"]/redcord/@a

AND

/categories/category[@NAME="B"]/redcord/@b

The Output that i've been making is

<categories>
  <category NAME="A">
    <redcord a="1" b="ASD"></redcord>
    <redcord a="2" b="QWE"></redcord>
  </category>
</categories>

Anyone have any idea how to make the XML format as i wanted above? Fyi : I'm using Oracle Database , Datastage

来源:https://stackoverflow.com/questions/59607487/how-change-the-xpath-and-xml-output-format-in-datastage

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!