Read XML code from ZIP file

Certified Senior Developer

I have a use use case, when any developer uploads their package in one interface  and that should go through the XML code and return if any objects in that package are using any deprecated functions.

To achieve that , is there any function that would read the XML file

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Senior Developer
    in reply to Stefan Helzle

    Hi Stefan,
    Thanks for it.
    I am finding difficulty in using xpathdocument() I am passing the XML file of object as docId but I was struck at expression and prefix.

    I tried giving the <definition> in the expression but its throwing the following error.
    Expression evaluation error at function a!forEach [line 6]: Error in a!forEach() expression during iteration 1: Expression evaluation error at function 'xpathdocument' [line 8]: An error occurred while trying to evaluate the XPath expression (<definition>).

    a!localVariables(
      local!allObjectsXMLcode: getdocumentsfromfolder(
        rootFolder: 372884,
        recursiveSearch: false()
      ),
      a!forEach(
        items: local!allObjectsXMLcode[1],
        expression: xpathdocument(
          docId: fv!item,
          expression: "<definition>"
        )
      )
    )

Children