1 Reply Latest reply: Jan 23, 2012 12:37 PM by "Andrei Costache, Oracle-Oracle" RSS

    How to manipulate to get desired output

    user296311
      Hi,

      I have following xml file with tags as shown below inorder to display output as

      <?xml version="1.0" encoding="ISO-8859-1" ?>
      - <EMPLOYEE_REPORT>
      - <EMPLOYEE>
      - <EMPLOYEE_OTHER_INFORMATION>
      <ORGANIZATION_ID_BUSINESS_GROUP>0</ORGANIZATION_ID_BUSINESS_GROUP>
      <INFO_TYPE>ELEMENT</INFO_TYPE>
      <NAME>Medical </NAME>
      <VALUE_TYPE>Amount</VALUE_TYPE>
      <VALUE>561.72</VALUE>
      <ELEMENT_TYPE_ID>2916</ELEMENT_TYPE_ID>
      <INPUT_VALUE_ID>140062</INPUT_VALUE_ID>
      <BALANCE_TYPE_ID />
      <DIMENSION />
      <UNIT_OF_MEASURE>M</UNIT_OF_MEASURE>
      <INFORMATION_CONTEXT />
      <REPORTING_NAME>Medical </REPORTING_NAME>
      </EMPLOYEE_OTHER_INFORMATION>
      - <EMPLOYEE_OTHER_INFORMATION>
      <ORGANIZATION_ID_BUSINESS_GROUP>0</ORGANIZATION_ID_BUSINESS_GROUP>
      <INFO_TYPE>ELEMENT</INFO_TYPE>
      <NAME>Dental </NAME>
      <VALUE_TYPE>Amount</VALUE_TYPE>
      <VALUE>38.88</VALUE>
      <ELEMENT_TYPE_ID>2917</ELEMENT_TYPE_ID>
      <INPUT_VALUE_ID>140063</INPUT_VALUE_ID>
      <BALANCE_TYPE_ID />
      <DIMENSION />
      <UNIT_OF_MEASURE>M</UNIT_OF_MEASURE>
      <INFORMATION_CONTEXT />
      <REPORTING_NAME>Dental </REPORTING_NAME>
      </EMPLOYEE_OTHER_INFORMATION>
      - <EMPLOYEE_OTHER_INFORMATION>
      <ORGANIZATION_ID_BUSINESS_GROUP>0</ORGANIZATION_ID_BUSINESS_GROUP>
      <INFO_TYPE>BALANCE</INFO_TYPE>
      <NAME>Medical </NAME>
      <VALUE_TYPE>ASG_YTD</VALUE_TYPE>
      <VALUE>561.72</VALUE>
      <ELEMENT_TYPE_ID />
      <INPUT_VALUE_ID />
      <BALANCE_TYPE_ID>10544722</BALANCE_TYPE_ID>
      <DIMENSION>165</DIMENSION>
      <UNIT_OF_MEASURE>M</UNIT_OF_MEASURE>
      <INFORMATION_CONTEXT />
      <REPORTING_NAME>Medical </REPORTING_NAME>
      </EMPLOYEE_OTHER_INFORMATION>
      - <EMPLOYEE_OTHER_INFORMATION>
      <ORGANIZATION_ID_BUSINESS_GROUP>0</ORGANIZATION_ID_BUSINESS_GROUP>
      <INFO_TYPE>BALANCE</INFO_TYPE>
      <NAME>Dental </NAME>
      <VALUE_TYPE>ASG_YTD</VALUE_TYPE>
      <VALUE>38.88</VALUE>
      <ELEMENT_TYPE_ID />
      <INPUT_VALUE_ID />
      <BALANCE_TYPE_ID>10544723</BALANCE_TYPE_ID>
      <DIMENSION>165</DIMENSION>
      <UNIT_OF_MEASURE>M</UNIT_OF_MEASURE>
      <INFORMATION_CONTEXT />
      <REPORTING_NAME>Dental </REPORTING_NAME>
      </EMPLOYEE_OTHER_INFORMATION>
      - </EMPLOYEE>
      - </EMPLOYEE_REPORT>


      Output I am getting is as shown below as per my .rtf file

      Other Information Amount Yearly

      Medical ER 507.95
      Dental ER 38.88
      Medical ER 507.95
      Dental ER 38.88

      Output I want is as shown below

      Other Information Amount Yearly

      Medical ER 507.95 507.95
      Dental ER 38.88 38.88


      From the above xml tags is it possible to print the Medical ER & Dental ER Yearly values just next to Amount in same line without repeating the "Names" Medical & Dental ER twice. The </EMPLOYEE_OTHER_INFORMATION> tag is within main tag <EMPLOYEE_REPORT> AND <EMPLOYEE> Tag all other tags are in same level. Isit possible to get the output which i want ..since there are four </Employee_Other_Information> tags.