Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


XPath command to extract the following info?

From: "JS" <sss@---.--->
To: NULL
Date: 4/9/2009 11:54:00 AM
Given the below XML file:

<Top>
  <Tree id="doc" lang="en" refid="tree">
    <blocks>
      <block id="block" order="1.1" refid="Type0" type="table">
        <parameters>
          <parameter id="Name" value="Bob"/>
          <parameter id="Position" value="Developer"/>
        </parameters>
      </block>
      <block id="block" order="1.2" refid="Type1" type="table">
        <datatables>
          <datatable tableid="Type1">
            <rows>
              <row order="7">
                <datum id="a" value="value00"/>
                <datum id="b" value="value11"/>
                <datum id="c" value="value22"/>
              </row>
            </rows>
          </datatable>
        </datatables>
      </block>
    </blocks>
    <outputs>
      <output name="out" type="doc"/>
    </outputs>
  </Tree>
</Top>

I have defined the following rowmapping:

//block/*

Now I would like to extract all id and values from :

parameters and datum

I have tried:

parameter/@id
parameter/@value
datatable/rows/row/datum/@id
datatable/rows/row/datum/@value

but that only gives me the first entry. Any ideas?

How do I get 



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent