Skip navigation
Purush14
Currently Being Moderated

Any idea how to loop and add all the value to the attribute of the xml node?

Mar 9, 2012 2:44 PM

I am working on a batch flattening project using Watched Folder.

I have a parent process for locating the directory and invokes a subprocess for flattening the PDF files.

I want to write the failed directory to the XML.

If there are multiple failed directory locations and if I want to add it to the node, it won't let me do.

If I set the Xpath location as /process_data/outputXML/flattenDirectoryRequestMessage/failureFileLoc ation[x]/@path it gives me invalid character exception.I am using 'x' for looping and incrementing.

If I don't use the [x]. The directory is overwritten.

Any idea how to loop and add all the failed directories to the attribute of the xml node?

 
Replies
  • Currently Being Moderated
    Mar 12, 2012 2:45 AM   in reply to Purush14

    I presume that X is a variable of type int.

     

    Just modify the XPATH expression as below and give it a try..

     

    /process_data/outputXML/flattenDirectoryRequestMessage/failureFileLoc ation[x+0]/@path

    OR

     

    /process_data/outputXML/flattenDirectoryRequestMessage/failureFileLoc ation[Number(x)]/@path

    Nith

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points