Problema com Jdom

Pessoal.

Estou com um problema no uso do Jdom, to tentando ler um XML , ele nao le todos o XML. o XML eh este

  <?xml version="1.0" encoding="UTF-8" ?> 
- <nfeProc xmlns="http://www.portalfiscal.inf.br/nfe" versao="1.10">
- <NFe xmlns="http://www.portalfiscal.inf.br/nfe">
- <infNFe Id="NFe41090576904192000122550020000005447569772814" versao="1.10">
- <ide>
  <cUF>41</cUF> 
  <cNF>756977281</cNF> 
  <natOp>RET. INDUSTRIALIZACAO ESTADUAL</natOp> 
  <indPag>1</indPag> 
  <mod>55</mod> 
  <serie>2</serie> 
  <nNF>544</nNF> 
  <dEmi>2009-05-21</dEmi> 
  <dSaiEnt>2009-05-21</dSaiEnt> 
  <tpNF>1</tpNF> 
  <cMunFG>4125506</cMunFG> 
  <tpImp>1</tpImp> 
  <tpEmis>1</tpEmis> 
  <cDV>4</cDV> 
  <tpAmb>1</tpAmb> 
  <finNFe>1</finNFe> 
  <procEmi>0</procEmi> 
  <verProc>034</verProc> 
  </ide>
- <emit>
  <CNPJ>76904192000122</CNPJ> 
  <xNome>LUFER INDUSTRIA MECANICA S/A.</xNome> 
  <xFant>LUFER/DIVERSOS</xFant> 
- <enderEmit>
  <xLgr>AV RUI BARBOSA</xLgr> 
  <nro>5148</nro> 
  <xBairro>AFONSO PENA</xBairro> 
  <cMun>4125506</cMun> 
  <xMun>SAO JOSE DOS PINHAIS</xMun> 
  <UF>PR</UF> 
  <CEP>83065260</CEP> 
  <cPais>1058</cPais> 
  <xPais>BRASIL</xPais> 
  <fone>4121113536</fone> 
  </enderEmit>
  <IE>1050293145</IE> 
  <IEST>9044687116</IEST> 
  </emit>
- <dest>
  <CNPJ>62154521000150</CNPJ> 
  <xNome>IBRATEC INDUSTRIA BRASILEIRA DE ARTEFATOS TECNICOS LTDA.</xNome> 
- <enderDest>
  <xLgr>RODOVIA BR 476</xLgr> 
  <nro>20886</nro> 
  <xBairro>PINHEIRINHO</xBairro> 
  <cMun>4106902</cMun> 
  <xMun>CURITIBA</xMun> 
  <UF>PR</UF> 
  <CEP>81690400</CEP> 
  <cPais>1058</cPais> 
  <xPais>BRASIL</xPais> 
  <fone>4133162300</fone> 
  </enderDest>
  <IE>9026538057</IE> 
  </dest>
- <det nItem="1">
- <prod>
  <cProd>CFOP5124</cProd> 
  <cEAN /> 
  <xProd>PARAFUSO DO BALANCIM 13404 (RECOZIMENTO EM 01 CARGA)</xProd> 
  <NCM>73181500</NCM> 
  <genero>73</genero> 
  <CFOP>5124</CFOP> 
  <uCom>UN</uCom> 
  <qCom>1.0000</qCom> 
  <vUnCom>321.5600</vUnCom> 
  <vProd>321.56</vProd> 
  <cEANTrib /> 
  <uTrib>UN</uTrib> 
  <qTrib>1.0000</qTrib> 
  <vUnTrib>321.5600</vUnTrib> 
  </prod>
- <imposto>
- <ICMS>
- <ICMS40>
  <orig>0</orig> 
  <CST>40</CST> 
  </ICMS40>
  </ICMS>
- <IPI>
  <cEnq>999</cEnq> 
- <IPINT>
  <CST>53</CST> 
  </IPINT>
  </IPI>
- <PIS>
- <PISAliq>
  <CST>01</CST> 
  <vBC>321.56</vBC> 
  <pPIS>0.00</pPIS> 
  <vPIS>0.00</vPIS> 
  </PISAliq>
  </PIS>
- <COFINS>
- <COFINSAliq>
  <CST>01</CST> 
  <vBC>321.56</vBC> 
  <pCOFINS>0.00</pCOFINS> 
  <vCOFINS>0.00</vCOFINS> 
  </COFINSAliq>
  </COFINS>
  </imposto>
  </det>
- <det nItem="2">
- <prod>
  <cProd>CFOP5902</cProd> 
  <cEAN /> 
  <xProd>PARAFUSO DO BALANCIM 13404</xProd> 
  <NCM>73181500</NCM> 
  <genero>73</genero> 
  <CFOP>5902</CFOP> 
  <uCom>M</uCom> 
  <qCom>7.5200</qCom> 
  <vUnCom>1362.6300</vUnCom> 
  <vProd>10246.98</vProd> 
  <cEANTrib /> 
  <uTrib>M</uTrib> 
  <qTrib>7.5200</qTrib> 
  <vUnTrib>1362.6300</vUnTrib> 
  </prod>
- <imposto>
- <ICMS>
- <ICMS40>
  <orig>0</orig> 
  <CST>40</CST> 
  </ICMS40>
  </ICMS>
- <IPI>
  <cEnq>999</cEnq> 
- <IPINT>
  <CST>53</CST> 
  </IPINT>
  </IPI>
- <PIS>
- <PISAliq>
  <CST>01</CST> 
  <vBC>10246.98</vBC> 
  <pPIS>0.00</pPIS> 
  <vPIS>0.00</vPIS> 
  </PISAliq>
  </PIS>
- <COFINS>
- <COFINSAliq>
  <CST>01</CST> 
  <vBC>10246.98</vBC> 
  <pCOFINS>0.00</pCOFINS> 
  <vCOFINS>0.00</vCOFINS> 
  </COFINSAliq>
  </COFINS>
  </imposto>
  </det>
- <total>
- <ICMSTot>
  <vBC>0.00</vBC> 
  <vICMS>0.00</vICMS> 
  <vBCST>0.00</vBCST> 
  <vST>0.00</vST> 
  <vProd>10568.54</vProd> 
  <vFrete>0.00</vFrete> 
  <vSeg>0.00</vSeg> 
  <vDesc>0.00</vDesc> 
  <vII>0.00</vII> 
  <vIPI>0.00</vIPI> 
  <vPIS>0.00</vPIS> 
  <vCOFINS>0.00</vCOFINS> 
  <vOutro>0.00</vOutro> 
  <vNF>10568.54</vNF> 
  </ICMSTot>
  </total>
- <transp>
  <modFrete>1</modFrete> 
  <vol /> 
  </transp>
- <cobr>
- <dup>
  <nDup>544-01</nDup> 
  <dVenc>2009-07-20</dVenc> 
  <vDup>160.78</vDup> 
  </dup>
- <dup>
  <nDup>544-02</nDup> 
  <dVenc>2009-08-19</dVenc> 
  <vDup>160.78</vDup> 
  </dup>
  </cobr>
- <infAdic>
  <infCpl>"SEGURO AA BASE DE OCORRENCIA: NOSSA RESPONSABILIDADE CIVIL, EM GERAL,;CONTEMPLA APENAS COBERTURAS ATUALMENTE CONTRATADAS".;Via de transporte: RODOVIARIO;ICMS SUSPENSO CONFORME ARTIGO 299, DECRETO 1980/07 - RICMS/PR;IPI SUSPENSO CONFORME ARTIGO 42, INCISO VII, DECRETO 4544/2002;COBRANCA DE INDUSTRIALIZACAO REF. SUA NF NR.: 713 19/05/2009;RETORNO REF. SUA NF NR.: 713 19/05/2009;ORDEM DE COMPRA NR :;RETENCAO PIS 0,1%/COFINS 0,5% CONF. ART.42 PGRAFO 3 DA LEI 11.196/05;Condicoes de pagamento: 60/90 DIAS</infCpl> 
  </infAdic>
  </infNFe>
- <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
- <SignedInfo>
  <CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" /> 
  <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" /> 
- <Reference URI="#NFe41090576904192000122550020000005447569772814">
- <Transforms>
  <Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /> 
  <Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" /> 
  </Transforms>
  <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /> 
  <DigestValue>6CrZDl1+j85MhjV2rRt1/BeBppM=</DigestValue> 
  </Reference>
  </SignedInfo>
  <SignatureValue>FLw9kl9fYa1tF+BBh+GvB6OWuHoGB+sQYuckpgaF/etycc/u0x6OhWiSMF891ED5p+XLuW/rt6q6 QQCH+nmn4Px/hfVrtuPUzZGkF/xWpd0n4U9xrIXmiFAvbGMrq8Z3VB4GEXlvsU5krBbk5ybyYuV8 7rCxxrjL4+6I0TPTlyE=</SignatureValue> 
- <KeyInfo>
- <X509Data>
  <X509Certificate>MIIGKjCCBRKgAwIBAgIIOYEkC6H5JNMwDQYJKoZIhvcNAQEFBQAwTDELMAkGA1UEBhMCQlIxEzAR BgNVBAoTCklDUC1CcmFzaWwxKDAmBgNVBAMTH1NFUkFTQSBDZXJ0aWZpY2Fkb3JhIERpZ2l0YWwg djEwHhcNMDkwMzA0MTMwMDAwWhcNMTIwMzAzMTMwMDAwWjCB5zELMAkGA1UEBhMCQlIxEzARBgNV BAoTCklDUC1CcmFzaWwxFDASBgNVBAsTCyhFTSBCUkFOQ08pMRgwFgYDV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6BBoD+GPWh0dHA6Ly9sY3IuY2VydGlmaWNh ZG9zLmNvbS5ici9yZXBvc2l0b3Jpby9sY3Ivc2VyYXNhY2R2MS5jcmwwU6BRoE+GTWh0dHA6Ly9y ZXBvc2l0b3Jpby5pY3BicmFzaWwuZ292LmJyL2xjci9TZXJhc2EvcmVwb3NpdG9yaW8vbGNyL3Nl cmFzYWNkdjEuY3JsMIGXBggrBgEFBQcBAQSBijCBhzA8BggrBgEFBQcwAYYwaHR0cDovL29jc3Au Y2VydGlmaWNhZG9kaWdpdGFsLmNvbS5ici9zZXJhc2FjZHYxMEcGCCsGAQUFBzAChjtodHRwOi8v d3d3LmNlcnRpZmljYWRvZGlnaXRhbC5jb20uYnIvY2FkZWlhcy9zZXJhc2FjZHYxLnA3YjANBgkq hkiG9w0BAQUFAAOCAQEAQvBZ6B9SuwKSPA+sa4cXnmPLu2kTSJR0z52f7/FaiIczYrPlKZWoIJoj eyqbu9jrdzJTIC5mxZlXfDneI5EdaQ3cMoW24CtoF+qP/lEhHIyUgpb8QCWzHkS9iqzdpgz6yiev iYZLbUjXmMNyITLuEU3rrsroaXJl+3PDpNevFq6+uQfPTczlp/1o4G5oNS/8VOXFsbd2HZ3crk9q 4SQi/YDCZbh78DH2sj6NU9bjdlknnxvp6DKHkZuP4BekFJrDHnuZJrAQp0lgt87bY1KUsiWIkhpv 0/Jq3sCvxtlGL06ctPPDl+HqkJ0xv8UU+TVLeHLUUWza5LuQaXixppWbDQ==</X509Certificate> 
  </X509Data>
  </KeyInfo>
  </Signature>
  </NFe>
- <protNFe versao="1.10">
- <infProt Id="ID141090009399362">
  <tpAmb>1</tpAmb> 
  <verAplic>v3314</verAplic> 
  <chNFe>41090576904192000122550020000005447569772814</chNFe> 
  <dhRecbto>2009-05-21T11:55:53</dhRecbto> 
  <nProt>141090009399362</nProt> 
  <digVal>6CrZDl1+j85MhjV2rRt1/BeBppM=</digVal> 
  <cStat>100</cStat> 
  <xMotivo>Autorizado o uso de NF-e (IdNFe: NFe41090576904192000122550020000005447569772814)</xMotivo> 
  </infProt>
  </protNFe>
  </nfeProc>

mas quando mando ler ele nao le , por exemplo, dento das tags

segue o código que usei:


File f = new File("c:/meuxml.xml");

        SAXBuilder sb = new SAXBuilder();

        Document d = sb.build(f);

        Element mural = d.getRootElement();
            
        List elements = mural.getChildren();
        Iterator i = elements.iterator();

        while(i.hasNext()) {
            Element element = (Element)i.next();
            System.out.println( element.getAttributeValue("natOp"));
            
        } 

Alguem pode me ajudar com isso?

natOp não é um atributo e sim um elemento. Você precisa ler o elemento do tipo texto que está dentro da tag <natOp>

Deculpe a ignorância Thingol, mas não sei mesmo como fazer essa leitura pq nunca mexi xom xml e debuguei o codigo no IDE, dai dei uma olhada no observador do eclipse em “d” pq pensei que conseguiria ver estes dados pelo observador e dessa maneira descobrir um método para ler os mesmos, mas não vi em nenhum atributo do document algo que ajudasse, vc pode me ajudar com esta duvida, ou alguem mais?

valeu

Alguem?