AnsweredAssumed Answered

Search a tag value in xml and get another tag's value in map

Question asked by akhajooei272797 on Sep 26, 2016
Latest reply on Sep 27, 2016 by akhajooei272797

Hi,

 

I am caching an xml document in an add to cache shape. this profile has the following structure:

 

<structure>
   <picklists>
      <picklist>
         <id>241</id>
         <options>
            <option>
               <id>1</id>
               <name>Bachelors</name>
            </option>
            <option>
               <id>2</id>
               <name>Doctorate</name>
            </option>

         </options>

      </picklist>

   </picklists>

</structure>

My goal is that in my map, search for example for the name="Bachelors" and then get the id value for it, which for Bachelors is 1. if However my name value was Doctorate, then id= 2 should be returned.

 

So to achieve this I have added this structure to a cache and added the name as my index.

 

then in my map, I have added a cache lookup function and then output id. However the id returned is not right when returned. I am not sure what I am missing.

 

I would really appreciate your help!

 

Below you can find the screenshots:

 

Outcomes