Hi All, I am trying to get xml data using xpathdocument(), The xml do

Hi All,

I am trying to get xml data using xpathdocument(), The xml document is saved in Appian(As attachment).
xml document contains attribute xmlns="http://www.adatum.com" at the root element. with out this attribute I can get the xml data. what could be the possible xpath expression.

xpathdocument(ri!doc,"//Tests")

Thanks.

testXml.xml

OriginalPostID-184414

OriginalPostID-184414

  Discussion posts and replies are publicly visible

Parents
  • You'll need to create a rule that returns your CDT (example below) and then apply that rule across the result of the xpathdocument() using "/*[name()='Tests']/*[name()='Test']".

    type!myCDT(
              name: xpathsnippet(ri!xml, "/*[name()='Test']/*[name()='Name']/text()")
              commandLine: xpathsnippet(ri!xml, "/*[name()='Test']/*[name()='CommandLine']/text()"
              input: xpathsnippet(ri!xml, "/*[name()='Test']/*[name()='Input']/text()"
              output: xpathsnippet(ri!xml, "/*[name()='Test']/*[name()='Output']/text()"
    )
Reply
  • You'll need to create a rule that returns your CDT (example below) and then apply that rule across the result of the xpathdocument() using "/*[name()='Tests']/*[name()='Test']".

    type!myCDT(
              name: xpathsnippet(ri!xml, "/*[name()='Test']/*[name()='Name']/text()")
              commandLine: xpathsnippet(ri!xml, "/*[name()='Test']/*[name()='CommandLine']/text()"
              input: xpathsnippet(ri!xml, "/*[name()='Test']/*[name()='Input']/text()"
              output: xpathsnippet(ri!xml, "/*[name()='Test']/*[name()='Output']/text()"
    )
Children
No Data