Menu

XpathExtract - using an extracted value

Help
Bob C
2005-02-24
2013-04-16
  • Bob C

    Bob C - 2005-02-24

    I am not sure how to access an extracted property in a later stage of the pipeline. The extract seems to be working, but when I try to use an extracted value in a later stage, an exception is thrown. Here is a snippet of my stage instance xml (a transform stage) :
    <option>
    <option-name>transformationFile</option-name>
    <option-value>data/$document.get("carrier")</option-value>
    </option>

    Is it as simple as using document.get, or is there a little more setup involved.

    Thanks,
    Bob

     
    • vanstalle

      vanstalle - 2005-02-25

      Hello,

      if you have something like
              <stage-inst>
                  <stage-name>extract</stage-name>
                  <stage-desc>this extracts stuff from the xml document</stage-desc>
                  <stage-type>XpathExtract</stage-type>
                  <option>
                      <option-name>XPath</option-name>
                      <option-value></option-value>

                      <sub-option>
                          <option-name>id</option-name>
                          <option-value>/data/id/text()</option-value>
                      </sub-option>

      then, in a later stage, you could access the value as ${document.get("id")}

      Jan

       
    • Bob C

      Bob C - 2005-02-25

      Thank You Jan. That works great!

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.