je souhaite avoir un parseur que j'aurai en entrée un fichier xml et que j'aurai en sortie une arboressence voilà mon fichier xml :


Code xml : 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
  <?xml version="1.0" encoding="UTF-8" ?> 
- <tp:CollaborationProtocolProfile xmlns:tp="http://www.ebxml.org/namespaces/tradePartner" xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xsi:schemaLocation="http://www.ebxml.org/namespaces/tradePartner http://ebxml.org/project_teams/trade_partner/cpp-cpa-v1_0.xsd" tp:version="1.1">
- <tp:PartyInfo>
  <tp:PartyId tp:type="DUNS">123456789</tp:PartyId> 
  <tp:PartyRef tp:href="http://example.com/about.html" /> 
- <tp:CollaborationRole tp:id="N00">
  <tp:ProcessSpecification tp:version="1.0" tp:name="buySell" xlink:type="simple" xlink:href="http://www.ebxml.org/processes/buySell.xml" /> 
  <tp:Role tp:name="buyer" xlink:type="simple" xlink:href="http://ebxml.org/processes/buySell.xml#buyer" /> 
  <tp:CertificateRef tp:certId="N03" /> 
- <tp:ServiceBinding tp:channelId="N04" tp:packageId="N0402">
  <tp:Service tp:type="uriReference">uri:example.com/services/buyerService</tp:Service> 
  <tp:Override tp:action="orderConfirm" tp:channelId="N07" tp:packageId="N0402" xlink:href="http://ebxml.org/processes/buySell.xml#orderConfirm" xlink:type="simple" /> 
  </tp:ServiceBinding>
  </tp:CollaborationRole>
- <tp:Certificate tp:certId="N03">
  <ds:KeyInfo /> 
  </tp:Certificate>
- <tp:DeliveryChannel tp:channelId="N04" tp:transportId="N05" tp:docExchangeId="N06">
  <tp:Characteristics tp:syncReplyMode="none" tp:nonrepudiationOfOrigin="true" tp:nonrepudiationOfReceipt="false" tp:secureTransport="true" tp:confidentiality="true" tp:authenticated="true" tp:authorized="false" /> 
  </tp:DeliveryChannel>
- <tp:DeliveryChannel tp:channelId="N07" tp:transportId="N08" tp:docExchangeId="N06">
  <tp:Characteristics tp:syncReplyMode="none" tp:nonrepudiationOfOrigin="true" tp:nonrepudiationOfReceipt="false" tp:secureTransport="false" tp:confidentiality="true" tp:authenticated="true" tp:authorized="false" /> 
  </tp:DeliveryChannel>
- <tp:Transport tp:transportId="N05">
  <tp:SendingProtocol tp:version="1.1">HTTP</tp:SendingProtocol> 
  <tp:ReceivingProtocol tp:version="1.1">HTTP</tp:ReceivingProtocol> 
  <tp:Endpoint tp:uri="https://www.example.com/servlets/ebxmlhandler" tp:type="allPurpose" /> 
- <tp:TransportSecurity>
  <tp:Protocol tp:version="3.0">SSL</tp:Protocol> 
  <tp:CertificateRef tp:certId="N03" /> 
  </tp:TransportSecurity>
  </tp:Transport>
- <tp:Transport tp:transportId="N08">
  <tp:SendingProtocol tp:version="1.1">HTTP</tp:SendingProtocol> 
  <tp:ReceivingProtocol tp:version="1.1">SMTP</tp:ReceivingProtocol> 
  <tp:Endpoint tp:uri="mailto:ebxmlhandler@example.com" tp:type="allPurpose" /> 
  </tp:Transport>
- <tp:DocExchange tp:docExchangeId="N06">
- <tp:ebXMLBinding tp:version="0.98b">
- <tp:ReliableMessaging tp:deliverySemantics="OnceAndOnlyOnce" tp:idempotency="true" tp:messageOrderSemantics="Guaranteed">
  <tp:Retries>5</tp:Retries> 
  <tp:RetryInterval>30</tp:RetryInterval> 
  <tp:PersistDuration>P1D</tp:PersistDuration> 
  </tp:ReliableMessaging>
- <tp:NonRepudiation>
  <tp:Protocol>http://www.w3.org/2000/09/xmldsig#</tp:Protocol> 
  <tp:HashFunction>http://www.w3.org/2000/09/xmldsig#sha1</tp:HashFunction> 
  <tp:SignatureAlgorithm>http://www.w3.org/2000/09/xmldsig#dsa-sha1</tp:SignatureAlgorithm> 
  <tp:CertificateRef tp:certId="N03" /> 
  </tp:NonRepudiation>
- <tp:DigitalEnvelope>
  <tp:Protocol tp:version="2.0">S/MIME</tp:Protocol> 
  <tp:EncryptionAlgorithm>DES-CBC</tp:EncryptionAlgorithm> 
  <tp:CertificateRef tp:certId="N03" /> 
  </tp:DigitalEnvelope>
  </tp:ebXMLBinding>
  </tp:DocExchange>
  </tp:PartyInfo>
- <tp:Packaging tp:id="N0402">
  <tp:ProcessingCapabilities tp:parse="true" tp:generate="true" /> 
- <tp:SimplePart tp:id="N40" tp:mimetype="text/xml">
  <tp:NamespaceSupported tp:location="http://ebxml.org/project_teams/transport/messageService.xsd" tp:version="0.98b">http://www.ebxml.org/namespaces/messageService</tp:NamespaceSupported> 
  <tp:NamespaceSupported tp:location="http://ebxml.org/project_teams/transport/xmldsig-core-schema.xsd" tp:version="1.0">http://www.w3.org/2000/09/xmldsig</tp:NamespaceSupported> 
  </tp:SimplePart>
- <tp:SimplePart tp:id="N41" tp:mimetype="text/xml">
  <tp:NamespaceSupported tp:location="http://ebxml.org/processes/buysell.xsd" tp:version="1.0">http://ebxml.org/processes/buysell.xsd</tp:NamespaceSupported> 
  </tp:SimplePart>
- <tp:CompositeList>
- <tp:Composite tp:id="N42" tp:mimetype="multipart/related" tp:mimeparameters="type=text/xml;">
  <tp:Constituent tp:idref="N40" /> 
  <tp:Constituent tp:idref="N41" /> 
  </tp:Composite>
  </tp:CompositeList>
  </tp:Packaging>
  <tp:Comment tp:xml_lang="en-us">buy/sell agreement between example.com and contrived-example.com</tp:Comment> 
  </tp:CollaborationProtocolProfile>