Trouble with Importing Multiple XML elements of same name

Reply
Contributor
Posts: 39

Trouble with Importing Multiple XML elements of same name

Hi,

 

I'm using SAS XML Mapper to create a "map" file. My problem is that, in my XML data file, there are 3 "<duration>" elements, which is shown below. When I use the following XML in the XML Map file, I always get the last value (2.803455). Can someone please guide me how to get all 3 values?

 

Thank you in advance for your help!

 

 

XML Map File's contents:

        <COLUMN name="Duration">
            <PATH syntax="XPath">/vnml/project/group/valuation/analytics/duration/sensitivity</PATH>
            <TYPE>numeric</TYPE>
            <DATATYPE>double</DATATYPE>
        </COLUMN>

 

 

XML File:

<?xml version="1.0"?><vnml>
<project name="test">
<group name="FutureAnalytics">
<valuation>
<analytics>
    <duration>
        <sensitivity>2.780203</sensitivity>
        <oas>
        <sensitivity>2.523299</sensitivity>
        </oas>
    </duration>
    <duration>
        <sensitivity direction="UP">2.756952</sensitivity>
    </duration>
    <duration>
        <sensitivity direction="DOWN">2.803455</sensitivity>
    </duration>
</analytics>
</valuation>
</group>
</project>
</vnml>

Ask a Question
Discussion stats
  • 0 replies
  • 255 views
  • 0 likes
  • 1 in conversation