I have a XML input which is obtained dynamically.How can i write the style sheet for it.I wanna show the xml in a tree format(using ul & li).I didn't get a clear idea to achieve it.
This is my xml format.Please give me a idea to start with it.

```
<body>
<elements segmentid="0" segmentuid="_020" description="Beginning of Hierarchical Transaction" required="true" empty="false">
  <datas required="true" name="Hierarchical Structure Code" text="0022">0022</datas>
  <datas required="true" name="Transaction Set Purpose Code" usertext="13">13</datas>
  <datas required="false" name="Reference Identification">199</datas>
  <datas required="false" name="Date" format="CCYYMMDD" function="Date">20111219</datas>
  <datas required="false" name="Time" format="HHMMSS" function="Time">010720</datas>
  <datas required="false" name="Transaction Type Code" />
</elements>
<elements segmentid="1" segmentuid="2000A_010" description="Information Source Level" required="true" havechildren="True" empty="false">
  <elements segmentid="2" segmentuid="2100A_030" description="Information Source Name" required="true" empty="false" customid="1298">
    <datas required="true" name="Entity Identifier Code" usertext="PR">PR</datas>
    <datas required="true" name="Entity Type Qualifier" usertext="2">2</datas>
    <datas required="false" name="Name Last or Organization Name">UNITED</datas>
    <datas required="false" name="Name First" />
    <datas required="false" name="Name Middle" />
    <datas required="false" name="Name Prefix" />
    <datas required="false" name="Name Suffix" />
    <datas required="false" name="Identification Code Qualifier" usertext="PI">PI</datas>
    <datas required="false" name="Identification Code" />
    <datas required="false" name="Entity Relationship Code" />
    <datas required="false" name="Entity Identifier Code" />
  </elements>
</elements>
<elements segmentid="3" segmentuid="2000B_010" description="Information Receiver Level" required="true" havechildren="True" empty="false">
  <elements segmentid="4" segmentuid="2100B_030" description="Information Receiver Name" required="true" empty="false">
    <datas required="true" name="Entity Identifier Code" usertext="FA">FA</datas>
    <datas required="true" name="Entity Type Qualifier" />
    <datas required="false" name="Name Last or Organization Name">SWXRAY</datas>
    <datas required="false" name="Name First" />
    <datas required="false" name="Name Middle" />
    <datas required="false" name="Name Prefix" />
    <datas required="false" name="Name Suffix" usertext="" />
    <datas required="false" name="Identification Code Qualifier" usertext="FI">XX</datas>
    <datas required="false" name="Identification Code" usertext="760022799">1467524231</datas>
    <datas required="false" name="Entity Relationship Code" />
    <datas required="false" name="Entity Identifier Code" />
    <elements segmentid="5" segmentuid="2100B_040" description="Information Receiver Additional Identification" required="false" empty="true">
      <datas required="true" name="Reference Identification Qualifier" />
      <datas required="false" name="Reference Identification" />
      <datas required="false" name="Description" />
      <datas required="false" name="REFERENCE IDENTIFIER" />
    </elements>
    <elements segmentid="6" segmentuid="2100B_060" description="Information Receiver Address" required="false" empty="true">
      <datas required="true" name="Address Information" />
      <datas required="false" name="Address Information" />
    </elements>  
</elements>
<elements segmentid="10" segmentuid="2000C_010" description="Subscriber Level" required="true" havechildren="false" empty="false">
  <elements segmentid="11" segmentuid="2000C_020" description="Subscriber Trace Number" required="false" empty="true">
    <datas required="true" name="Trace Type Code" text="1">1</datas>
    <datas required="true" name="Reference Identification">199</datas>
    <datas required="false" name="Originating Company Identifier" text="9EMDEDI" usertext="9EMDEDI">9EMDEDI</datas>
    <datas required="false" name="Reference Identification" />
  </elements>
  <elements segmentid="12" segmentuid="2100C_030" description="Subscriber Name" required="true" empty="false">
    <datas required="true" name="Entity Identifier Code" text="IL">IL</datas>
    <datas required="true" name="Entity Type Qualifier" text="1" usertext="1">1</datas>
    <datas required="false" name="Name Last or Organization Name">dfgdfg</datas>
    <datas required="false" name="Name First">dfgdfgdf</datas>
    <datas required="false" name="Name Middle" />
    <datas required="false" name="Name Prefix" />
    <datas required="false" name="Name Suffix" />
    <datas required="false" name="Identification Code Qualifier" usertext="MI">MI</datas>
    <datas required="false" name="Identification Code">54645654</datas>
    <datas required="false" name="Entity Relationship Code" />
    <datas required="false" name="Entity Identifier Code" />
    <elements segmentid="13" segmentuid="2100C_040" description="Subscriber Additional Identification" required="false" empty="true">
      <datas required="true" name="Reference Identification Qualifier" />
      <datas required="false" name="Reference Identification" />
      <datas required="false" name="Description" />
      <datas required="false" name="REFERENCE IDENTIFIER" />
    </elements>
    <elements segmentid="14" segmentuid="2100C_060" description="Subscriber Address" required="false" empty="true">
      <datas required="true" name="Address Information" />
      <datas required="false" name="Address Information" />
    </elements>
    <elements segmentid="15" segmentuid="2100C_070" description="Subscriber City/State/ZIP Code" required="false" empty="true">
      <datas required="false" name="City Name" />
      <datas required="false" name="State or Province Code" />
      <datas required="false" name="Postal Code" />
      <datas required="false" name="Country Code" />
      <datas required="false" name="Location Qualifier" />
      <datas required="false" name="Location Identifier" />
    </elements>
    <elements segmentid="16" segmentuid="2100C_090" description="Provider Information" required="false" empty="true">
      <datas required="true" name="Provider Code" />
      <datas required="true" name="Reference Identification Qualifier" text="ZZ">ZZ</datas>
      <datas required="true" name="Reference Identification" />
      <datas required="false" name="State or Province Code" />
      <datas required="false" name="PROVIDER SPECIALTY INFORMATION" />
      <datas required="false" name="Provider Organization Code" />
    </elements>
    <elements segmentid="17" segmentuid="2100C_100" description="Subscriber Demographic Information" required="false" empty="false">
      <datas required="false" name="Date Time Period Format Qualifier" text="D8">D8</datas>
      <datas required="false" name="Date Time Period" format="CCYYMMDD" function="Date">19761010</datas>
      <datas required="false" name="Gender Code" usertext="" />
      <datas required="false" name="Marital Status Code" />
      <datas required="false" name="Race or Ethnicity Code" />
      <datas required="false" name="Citizenship Status Code" />
      <datas required="false" name="Country Code" />
      <datas required="false" name="Basis of Verification Code" />
      <datas required="false" name="Quantity" />
    </elements>
    <elements segmentid="18" segmentuid="2100C_110" description="Subscriber Relationship" required="false" empty="true">
      <datas required="true" name="Yes/No Condition or Response Code" text="Y">Y</datas>
      <datas required="true" name="Individual Relationship Code" text="18">18</datas>
      <datas required="false" name="Maintenance Type Code" text="001">001</datas>
      <datas required="false" name="Maintenance Reason Code" text="25">25</datas>
      <datas required="false" name="Benefit Status Code" />
      <datas required="false" name="Medicare Plan Code" />
      <datas required="false" name="Consolidated Omnibus Budget Reconciliation Act (COBRA) Qualifying" />
      <datas required="false" name="Employment Status Code" />
      <datas required="false" name="Student Status Code" />
      <datas required="false" name="Yes/No Condition or Response Code" />
      <datas required="false" name="Date Time Period Format Qualifier" />
      <datas required="false" name="Date Time Period" />
      <datas required="false" name="Confidentiality Code" />
      <datas required="false" name="City Name" />
      <datas required="false" name="State or Province Code" />
      <datas required="false" name="Country Code" />
      <datas required="false" name="Number" />
    </elements>
    <elements segmentid="19" segmentuid="2100C_120" description="Subscriber Date" required="false" empty="false">
      <datas required="true" name="Date/Time Qualifier" usertext="307">307</datas>
      <datas required="true" name="Date Time Period Format Qualifier" usertext="D8">D8</datas>
      <datas required="true" name="Date Time Period" format="CCYYMMDD" function="Date">20111219</datas>
    </elements>
    <elements segmentid="20" segmentuid="2110C_130" description="Subscriber Eligibility or Benefit Inquiry Information" required="false" empty="false" repeat="10">
      <datas required="false" name="Service Type Code">4</datas>
      <datas required="false" name="COMPOSITE MEDICAL PROCEDURE IDENTIFIER">
        <compositedatas required="true" name="Product/Service ID Qualifier" />
        <compositedatas required="true" name="Product/Service ID" />
        <compositedatas required="false" name="Procedure Modifier" />
        <compositedatas required="false" name="Procedure Modifier" />
        <compositedatas required="false" name="Procedure Modifier" />
        <compositedatas required="false" name="Procedure Modifier" />
        <compositedatas required="false" name="Description" />
      </datas>
      <datas required="false" name="Coverage Level Code" />
      <datas required="false" name="Insurance Type Code" />
      <elements segmentid="21" segmentuid="2110C_135" description="Subscriber Spend Down Amount" required="false" empty="true">
        <datas required="true" name="Amount Qualifier Code" text="R">R</datas>
        <datas required="true" name="Monetary Amount" />
        <datas required="false" name="Credit/Debit Flag Code" />
      </elements>
      <elements segmentid="22" segmentuid="2110C_170" description="Subscriber Eligibility or Benefit Additional Inquiry Information" required="false" empty="true">
        <datas required="false" name="Code List Qualifier Code" />
        <datas required="false" name="Industry Code" />
        <datas required="false" name="Code Category" />
        <datas required="false" name="Free-Form Message Text" />
        <datas required="false" name="Quantity" />
        <datas required="false" name="COMPOSITE UNIT OF MEASURE" />
        <datas required="false" name="Surface/Layer/Position Code" />
        <datas required="false" name="Surface/Layer/Position Code" />
        <datas required="false" name="Surface/Layer/Position Code" />
      </elements>
      <elements segmentid="23" segmentuid="2110C_190" description="Subscriber Additional Information" required="false" empty="true">
        <datas required="true" name="Reference Identification Qualifier" />
        <datas required="false" name="Reference Identification" />
        <datas required="false" name="Description" />
        <datas required="false" name="REFERENCE IDENTIFIER" />
      </elements>
      <elements segmentid="24" segmentuid="2110C_200" description="Subscriber Eligibility/Benefit Date" required="false" empty="true">
        <datas required="true" name="Date/Time Qualifier" />
        <datas required="true" name="Date Time Period Format Qualifier" />
        <datas required="true" name="Date Time Period" format="CCYYMMDD(or)CCYYMMDD-CCYYMMDD" />
      </elements>
    </elements>
    <elements segmentid="20" segmentuid="2110C_130" description="Subscriber Eligibility or Benefit Inquiry Information" required="false" empty="false" repeat="10">
      <datas required="false" name="Service Type Code">30</datas>
      <datas required="false" name="COMPOSITE MEDICAL PROCEDURE IDENTIFIER">
        <compositedatas required="true" name="Product/Service ID Qualifier" />
        <compositedatas required="true" name="Product/Service ID" />
        <compositedatas required="false" name="Procedure Modifier" />
        <compositedatas required="false" name="Procedure Modifier" />
        <compositedatas required="false" name="Procedure Modifier" />
        <compositedatas required="false" name="Procedure Modifier" />
        <compositedatas required="false" name="Description" />
      </datas>
      <datas required="false" name="Coverage Level Code" />
      <datas required="false" name="Insurance Type Code" />
      <elements segmentid="21" segmentuid="2110C_135" description="Subscriber Spend Down Amount" required="false" empty="true">
        <datas required="true" name="Amount Qualifier Code" text="R">R</datas>
        <datas required="true" name="Monetary Amount" />
        <datas required="false" name="Credit/Debit Flag Code" />
      </elements>
      <elements segmentid="22" segmentuid="2110C_170" description="Subscriber Eligibility or Benefit Additional Inquiry Information" required="false" empty="true">
        <datas required="false" name="Code List Qualifier Code" />
        <datas required="false" name="Industry Code" />
        <datas required="false" name="Code Category" />
        <datas required="false" name="Free-Form Message Text" />
        <datas required="false" name="Quantity" />
        <datas required="false" name="COMPOSITE UNIT OF MEASURE" />
        <datas required="false" name="Surface/Layer/Position Code" />
        <datas required="false" name="Surface/Layer/Position Code" />
        <datas required="false" name="Surface/Layer/Position Code" />
      </elements>
      <elements segmentid="23" segmentuid="2110C_190" description="Subscriber Additional Information" required="false" empty="true">
        <datas required="true" name="Reference Identification Qualifier" />
        <datas required="false" name="Reference Identification" />
        <datas required="false" name="Description" />
        <datas required="false" name="REFERENCE IDENTIFIER" />
      </elements>
      <elements segmentid="24" segmentuid="2110C_200" description="Subscriber Eligibility/Benefit Date" required="false" empty="true">
        <datas required="true" name="Date/Time Qualifier" />
        <datas required="true" name="Date Time Period Format Qualifier" />
        <datas required="true" name="Date Time Period" format="CCYYMMDD(or)CCYYMMDD-CCYYMMDD" />
      </elements>
    </elements>
  </elements>
</elements>
<elements segmentid="25" segmentuid="2000D_010" description="Dependent Level" required="false" havechildren="False" empty="true">
  <elements segmentid="26" segmentuid="2000D_020" description="Dependent Trace Number" required="false" empty="true">
    <datas required="true" name="Trace Type Code" text="1">1</datas>
    <datas required="true" name="Reference Identification">199</datas>
    <datas required="false" name="Originating Company Identifier" text="9EMDEDI" usertext="9EMDEDI">9EMDEDI</datas>
    <datas required="false" name="Reference Identification" />
  </elements>
  <elements segmentid="27" segmentuid="2100D_030" description="Dependent Name" required="true" empty="false">
    <datas required="true" name="Entity Identifier Code" text="03">03</datas>
    <datas required="true" name="Entity Type Qualifier" text="1">1</datas>
    <datas required="false" name="Name Last or Organization Name">dfgdfg</datas>
    <datas required="false" name="Name First">dfgdfgdf</datas>
    <datas required="false" name="Name Middle" />
    <datas required="false" name="Name Prefix" />
    <datas required="false" name="Name Suffix" />
    <datas required="false" name="Identification Code Qualifier" />
    <datas required="false" name="Identification Code" />
    <datas required="false" name="Entity Relationship Code" />
    <datas required="false" name="Entity Identifier Code" />
    <elements segmentid="28" segmentuid="2100D_040" description="Dependent Additional Identification" required="false" empty="true">
      <datas required="true" name="Reference Identification Qualifier" />
      <datas required="false" name="Reference Identification" />
      <datas required="false" name="Description" />
      <datas required="false" name="REFERENCE IDENTIFIER" />
    </elements>
    <elements segmentid="29" segmentuid="2100D_060" description="Dependent Address" required="false" empty="true">
      <datas required="true" name="Address Information" />
      <datas required="false" name="Address Information" />
    </elements>
 </elements>

```

My Desired out should be

```
<ul>1.Beginning of Hierarchical Transaction
           <li>Hierarchical Structure Code-0022</li>
           <li>Transaction Set Purpose Code-13</li>
           <li>Reference Identification-199</li>
           <li>Date-20111219</li>
           <li>Time-010720</li>
</ul>    
<ul>2.Information Source Level
<ul>a.Information Source Name
           <li>Entity Identifier Code-PR</li>
           <li>Entity Type Qualifier-2</li>
           <li>Name Last or Organization Name-UNITED</li>
           <li>Name First-""</li>
           <li>Name Middle-""</li>

```

Like this.