2011-03-21 6 views
0
<!-- THIS XML IS USED AS REQUEST FOR 1) CALL RECORD SUBMISSION, 2) REJECTED CALL RECORD SUBMISSION --> 
<xoomiPadRequest> 
    <callRecord> 
     <callInformation> 
      <callRecordDateTime>11-18-2009 14:52:28</callRecordDateTime> 
      <callRecordSubmittedDateTime>11-18-2009 15:00:45</callRecordSubmittedDateTime>  
      <products> 
       <product> 
        <productId>1090</productId> 
        <productName>Invega</productName> 
        <productPriority>1</productPriority> 
       </product> 
       <product> 
        <productId>1091</productId> 
        <productName>Elmiron</productName> 
        <productPriority>2</productPriority> 
       </product> 
       <product> 
        <productId>1092</productId> 
        <productName>Aciphex</productName> 
        <productPriority>3</productPriority> 
       </product> 
       <product> 
        <productId>1093</productId> 
        <productName>Aci-jel</productName> 
        <productPriority>4</productPriority> 
       </product> 
       <product> 
        <productId>1094</productId> 
        <productName>Axert</productName> 
        <productPriority>5</productPriority> 
       </product> 
       <product> 
        <productId>1095</productId> 
        <productName>Caelyx</productName> 
        <productPriority>6</productPriority> 
       </product> 
       <product> 
        <productId>1096</productId> 
        <productName>Cetraxal</productName> 
        <productPriority>7</productPriority> 
       </product> 
       <product> 
        <productId>1097</productId> 
        <productName>Concerta</productName> 
        <productPriority>8</productPriority> 
       </product> 
       <product> 
        <productId>1098</productId> 
        <productName>Doribax</productName> 
        <productPriority>9</productPriority> 
       </product> 
       <product> 
        <productId>1099</productId> 
        <productName>Duragesic</productName> 
        <productPriority>10</productPriority> 
       </product>    
     </products> 
      <callType>Presentation</callType> 
      <specialActivity>LOV from VP</specialActivity> 
     </callInformation> 
     <hcpInformation> 
      <hcpUniqueIdentifier>HH353488</hcpUniqueIdentifier> 
      <hcpLastName>Ryan</hcpLastName> 
      <hcpFirstName>Tony</hcpFirstName> 
      <hcpAcademicProfessionalTitle>Dr.</hcpAcademicProfessionalTitle> 
      <!-- New tag which replaces the old address fields --> 
      <hcpAddressId>1001</hcpAddressId> 
      <hcpTelephoneNumber>(986) 654-1213</hcpTelephoneNumber> 
      <hcpEmail>[email protected]</hcpEmail> 
      <hcpFaxNumber>(908) 776-5221</hcpFaxNumber> 
      <!-- New tag for holding rep's rating of HCP --> 
      <hcpRating>Good (4)</hcpRating> 
     </hcpInformation> 
     <repInformation> 
      <repUniqueIdentifier>RR982398</repUniqueIdentifier> 
      <repName>Bob Richard</repName> 
      <repVoiceMailNumber>23232</repVoiceMailNumber> 
      <repEmail>[email protected]</repEmail> 
     </repInformation>  
    </callRecord> 
</xoomiPadRequest> 

ci-dessus est mon XML file.i veulent analyser avec mon écran projet.Le contient des cases à cocher dans listview.i veulent afficher les noms des produits dans mon checkboxes.but je ne sais pas comment analyser it.plz aide moi ...xml statique analyse syntaxique

Répondre

0

fichier t5he ouvert comme InputStream et:

Document doc = null; 
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); 
DocumentBuilder db = dbf.newDocumentBuilder(); 
doc = db.parse(inputstream); 

vous pouvez maintenant le doch avec gerer l'arret par exemple doc.getElementsByTagName();