Bonjour à tous,
J'ai fais une opération de marshalling sur un objet java pour le transformer en fichier xml avec l'api Xstream. J'ai obtenu un String xml qui ressemble à ça:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?xml version="1.0" encoding="UTF-8"?>
<com.fsiq.schemas.recherchepechorshospi.GetRecherchePEChorsHospiInterneIn>
   <header>
      <headerTech>
         <idLogicielPS>111</idLogicielPS>
         <versionLogicielPS>1112</versionLogicielPS>
         <idSessionClient>5</idSessionClient>
      </headerTech>
      <headerFonc>
         <codeContexte>5</codeContexte>
         <delivranceAccreditation>0</delivranceAccreditation>
         <version>5</version>
         <idDossier>5</idDossier>
         <codeProprietaire>5</codeProprietaire>
         <codeGestionnaire>5</codeGestionnaire>
      </headerFonc>
   </header>
   <requeteRecherchePEChorsHospi>
      <idPS>
         <numFINESS>456456</numFINESS>
         <numeroPSEmetteur>45345</numeroPSEmetteur>
         <identifiantRPPS>456456</identifiantRPPS>
      </idPS>
      <demandeRecherchePEChorsHospiInterne>
         <com.fsiq.schemas.recherchepechorshospi.TypeDemandeRecherchePEChorsHospiInterne>
            <identificationPatient>
               <amo>
                  <organisme>
                     <regime>5</regime>
                     <caisse>5</caisse>
                     <centre>5</centre>
                  </organisme>
                  <medecinTraitant>
                     <identificationFacturationPS>
                        <numFINESS>5</numFINESS>
                        <numeroPSEmetteur>5</numeroPSEmetteur>
                        <identifiantRPPS>5</identifiantRPPS>
                     </identificationFacturationPS>
                     <raisonSociale>5</raisonSociale>
                     <complementRaisonSociale />
                  </medecinTraitant>
               </amo>
               <amc>
                  <nom>5</nom>
               </amc>
               <beneficiaire>
                  <nirCertifie>5</nirCertifie>
                  <cleNIR>5</cleNIR>
                  <dateNaissance>5</dateNaissance>
                  <rangGemellaire>1</rangGemellaire>
                  <insc>5</insc>
                  <nomBeneficiaire>5</nomBeneficiaire>
                  <prenomBeneficiaire>5</prenomBeneficiaire>
                  <qualite>5</qualite>
               </beneficiaire>
            </identificationPatient>
            <infosRecherchePEChorsHospi>
               <numRecherche>5</numRecherche>
                 <etatPEC>5</etatPEC>
               <domainePEC>5</domainePEC>
               <nombrePECMax>5</nombrePECMax>
            </infosRecherchePEChorsHospi>
            <enteteFactureHorsHospi>
               <numDemande>5</numDemande>
               <numFacture>5</numFacture>
               <natureAssurance />
               <indicateurParcoursSoins>5</indicateurParcoursSoins>
               <numeroAccidentTravail>5</numeroAccidentTravail>
               <naturePieceJustificative>5</naturePieceJustificative>
 
               <ligneActeHorsHospi>
                  <com.fsiq.schemas.recherchepechorshospi.TypeLigneActe>
                     <numLigne>5</numLigne>
                     <baseRO>5</baseRO>
                     <pSexecutant>5</pSexecutant>
                  </com.fsiq.schemas.recherchepechorshospi.TypeLigneActe>
               </ligneActeHorsHospi>
            </enteteFactureHorsHospi>
         </com.fsiq.schemas.recherchepechorshospi.TypeDemandeRecherchePEChorsHospiInterne>
      </demandeRecherchePEChorsHospiInterne>
   </requeteRecherchePEChorsHospi>
</com.fsiq.schemas.recherchepechorshospi.GetRecherchePEChorsHospiInterneIn>
Quand je récupère ce String je dois le parser pour extraire quelques données. j'ai utiliser les api Stax et xpath mais elles n'arrivent pas à parcourir cette arborescence vue que sa contient des balises avec le format: com.fsiq.schemas.recherchepechorshospi.GetRecherchePEChorsHospiInterneIn (c'est des noms de packages).
avez-vous une idée sur comment faire pour parcourir une arborescence quelque soit son format? Merci.