Created
October 23, 2023 12:18
-
-
Save juanchehin/12a51570f868c4cb12f7f596e132f204 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$xml = <<<EOD | |
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ar="http://ar.gov.afip.dif.FEV1/"> | |
<soapenv:Header/> | |
<soapenv:Body> | |
<ar:FECompUltimoAutorizado> | |
<ar:Auth> | |
<ar:Token>string</ar:Token> | |
<ar:Sign>string</ar:Sign> | |
<ar:Cuit>long</ar:Cuit> | |
</ar:Auth> | |
<ar:PtoVta>int</ar:PtoVta> | |
<ar:CbteTipo>int</ar:CbteTipo> | |
</ar:FECompUltimoAutorizado> | |
</soapenv:Body> | |
</soapenv:Envelope> | |
EOD; | |
$dom = new DOMDocument(); | |
$dom->loadXML($xml); | |
$ptoVta = $dom->getElementsByTagName('ar:PtoVta')[0]; | |
$ptoVta->textContent = '10'; | |
$xml = $dom->saveXML(); | |
echo $xml; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment