UCM - How to access repeat children nodes from XML

259 views Asked by At

I've got an XML document -

<PARTNER>
 <CompanyName>ABCD<CompanyName>
 <Address>XYZ</Address>
 <OFFER>
  <OFFERNAME>ABCDEFG</OFFERNAME>
  <OFFERDESC>XYZWV</OFFERDESC>
 </OFFER>
 <OFFER>
  <OFFERNAME>123456</OFFERNAME>
  <OFFERDESC>98765</OFFERDESC>
 </OFFER>
</PARTNER>

I want to access the individual OFFERNAME, OFFERDESC elements from each of the OFFER tags.

<!--$ssIncludeXml("dDocName","wcm:root/wcm:element[@name="OFFER"]/node()")-->

Gives me the entire ABCDEFG XYZWV 123456 98765 which I do not want. Is there a way I can access OFFERNAME, OFFERDESC from each of the OFFER tags?

PS: I have 2 OFFER nodes and each of them has 17 children nodes. When I try

<!--$ssGetXmlNodeCount("dDocName", "wcm:root/wcm:element[@name='OFFER']/node()")-->, I get 34.

<!--$ssIncludeXml("dDocName","wcm:root/wcm:element[@name="OFFER"][1]/node()")--> prints nothing.

0

There are 0 answers