Hi, i hope any can help me, i have the next situation:
I have a XML document, is an charge of Canceling, need obatain the attribute values of a element:
my xml is the next
I need obtain this
i cant get the text of elements, i have this for read this but dont returnme those attributes:
I have a XML document, is an charge of Canceling, need obatain the attribute values of a element:
my xml is the next
<?xml version="1.0"?> <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body> <CancelaCFDResponse xmlns="http://cancelacfd.sat.gob.mx"> <CancelaCFDResult Fecha="2016-01-18T16:13:25.1273627" RfcEmisor="CCO910614DN5"> <Folios> <UUID>CE48E873-1409-4566-8619-0ACC449AD5E5</UUID> <EstatusUUID>201</EstatusUUID> </Folios> <Signature Id="SelloSAT" 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/2001/04/xmldsig-more#hmac-sha512" /> <Reference URI=""> <Transforms> <Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116"> <XPath>not(ancestor-or-self::*[local-name()='Signature'])</XPath> </Transform> </Transforms> <DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha512" /> <DigestValue>rMD8d4QDZqyUHGWJz0flUQd1E27NsFBDosM6s++whMCjCW3dx92HTIQlvF2PFfNPnACwgkvksQ0C/7XpQ==</DigestValue> </Reference> </SignedInfo> <SignatureValue>0seP9bfry6PTwWXP9RsSs2+JCsI8o87ZHWtOix+1n76ZeA8NL1rWtQTr1BOEJ+Q0qezp3qyOYRl6l5AgxgEM8Q==</SignatureValu <KeyInfo> <KeyName>00001088800000016</KeyName> <KeyValue> <RSAKeyValue> <Modulus>xnL2zDPtH5jDsAZDTIfMqbKGrve+At8Kyx2EZvbfXbpK9uVExWS874oMelFzNq69/YqSReT3I7I8wr+joy5O7ouZH+4KWdIGp4Si6lHe0kntxzNmuuKyOPkJ9tMcntnFmQ4bfxFxlg/Ud2hCtuoy3j2xYkIXu5O4pGM98Nz8pAM=</Modulus> <Exponent>AQAB</Exponent> </RSAKeyValue> </KeyValue> </KeyInfo> </Signature> </CancelaCFDResult> </CancelaCFDResponse> </s:Body> </s:Envelope>
I need obtain this
and save into a text the Attribute 'FECHA', and in a second variable the 'RfcEmisor'.CancelaCFDResult Fecha="2016-01-18T16:13:25.1273627" RfcEmisor="CCO910614DN5"
i cant get the text of elements, i have this for read this but dont returnme those attributes:
IF ISCLEAR(lautxmldocument) THEN CREATE(lautxmldocument,FALSE, TRUE); lautxmldocument.load(PathCFDI); lautxmlnodelist := lautxmldocument.getElementsByTagName('UUID'); lautxmlnodelist2 := lautxmldocument.getElementsByTagName('EstatusUUID'); lautxmlnode := lautxmlnodelist.nextNode; lautxmlnode2 := lautxmlnodelist2.nextNode; lautxmlnodelist3 := lautxmldocument.childNodes; FOR i := 0 TO lautxmlnodelist3.length() - 1 DO BEGIN lautatributo := lautxmlnodelist3.item(i); IF NOT ISCLEAR(lautatributo)THEN lautxmlatributo := lautatributo.getAttributeNode('Fecha'); IF NOT ISCLEAR(lautxmlatributo) THEN tfecha := lautxmlatributo.value; END; tfecha:= lautatributo.nodeValue; tuuid := lautxmlnode.text; testatusuuid := lautxmlnode2.text; fechacancelacion := COPYSTR(tfecha,1, 19); testatusuuid := lautxmlnode2.text; "Date/Time Canceled" := fechacancelacion; "Fiscal Invoice Number PAC" := tuuid; "Date/Time Canceled" := fechacancelacion; IF testatusuuid = '201' THEN BEGIN "Electronic Document Status" := "Electronic Document Status"::Canceled; "Error Code" := lautxmlnode2.text; "Error Description" := 'Cancelado'; END;[s][s][/s][/s]Any idea