1 Reply Latest reply on Nov 30, 2010 1:31 AM by Aurelien Vannieuwenhuyze

    Parsing in xml which is sdmx format

    KapilArora021983

      <?xml version="1.0" encoding="utf-8"?>
      <message:Structure xmlns:common="http://www.SDMX.org/resources/SDMXML/schemas/v2_0/common" xmlns:query="http://www.SDMX.org/resources/SDMXML/schemas/v2_0/query" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xmlns:xml="http://www.w3.org/XML/1998/namespace" xmlns:genericmetadata="http://www.SDMX.org/resources/SDMXML/schemas/v2_0/genericmetadata" xmlns:compact="http://www.SDMX.org/resources/SDMXML/schemas/v2_0/compact" xmlns:utility="http://www.SDMX.org/resources/SDMXML/schemas/v2_0/utility" xmlns:message="http://www.SDMX.org/resources/SDMXML/schemas/v2_0/message" xmlns:registry="http://www.SDMX.org/resources/SDMXML/schemas/v2_0/registry" xmlns:generic="http://www.SDMX.org/resources/SDMXML/schemas/v2_0/generic" xmlns:structure="http://www.SDMX.org/resources/SDMXML/schemas/v2_0/structure" xmlns:metadatareport="http://www.SDMX.org/resources/SDMXML/schemas/v2_0/metadatareport" xmlns:cross="http://www.SDMX.org/resources/SDMXML/schemas/v2_0/cross">
      <message:Header>
        <message:ID>DI</message:ID>
        <message:Test>false</message:Test>
        <message:Name xml:lang="en"/>
        <message:Prepared>2010-11-29T12:46:48+05:30</message:Prepared>
        <message:Sender id="">
         <message:Name xml:lang="en"/>
         <message:Contact>
          <message:Name xml:lang="en"/>
          <message:Telephone xml:lang="en"/>
          <message:Fax xml:lang="en"/>
          <message:Department xml:lang="en"/>
          <message:Role xml:lang="en"/>
          <message:Email/>
         </message:Contact>
        </message:Sender>
        <message:Sender id="">
         <message:Name xml:lang="en"/>
         <message:Contact>
          <message:Name xml:lang="en"/>
          <message:Telephone xml:lang="en"/>
          <message:Fax xml:lang="en"/>
          <message:Department xml:lang="en"/>
          <message:Role xml:lang="en"/>
          <message:Email/>
         </message:Contact>
        </message:Sender>
      </message:Header>
      <message:CodeLists>
        <structure:CodeList id="CL_IUS" agencyID="">
         <structure:Name xml:lang="en">Indicator{[~]}Unit{[~]}Subgroup</structure:Name>
         <structure:Code value="indicatorgid~unitgid-SubgroupGID">
          <structure:Description xml:lang="en">Adult literacy rate{[~]}Unit{[~]}Subgroup</structure:Description>
          <structure:Annotations>
           <common:Annotation>
            <common:AnnotationTitle>SectorGID</common:AnnotationTitle>
            <common:AnnotationType>SectorName</common:AnnotationType>
           </common:Annotation>    
          </structure:Annotations>
         </structure:Code>
         <structure:Code value="indicatorgid~unitgid-SubgroupGID">
          <structure:Description xml:lang="en">Population{[~]}Unit{[~]}Subgroup</structure:Description>
          <structure:Annotations>
           <common:Annotation>
            <common:AnnotationTitle>SectorGID</common:AnnotationTitle>
            <common:AnnotationType>SectorName</common:AnnotationType>
           </common:Annotation>    
          </structure:Annotations>
         </structure:Code>
        </structure:CodeList>
      </message:CodeLists>
      </message:Structure>

       

       

       

      I hav the above xml format, i hav to parse this xml and get xmllist of <structure:Code> tags.

      i am trying using xml.message:CodeLists.structure:Code

      but it  is giving me compile time error

      Pls help.

       

      Regards

      Kapil Arora