lectura de XML desde un string - PHP Online
Form of PHP Sandbox
Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php
in the places where the PHP script should be executed.
Result of php executing
Full code of lectura de XML desde un string.php
- <?php
- $dirXML ='<?xml version="1.0" encoding="iso-8859-1"?>
- <DTE version="1.0">
- <Documento ID="T15433">
- <TED version="1.0">
- <DD>
- <CAF version="1.0">
- <DA>
- <RE>70064202-K</RE>
- <RS>JUNTA DE ALCALDES PROVIDENCIA LAS CONDES</RS>
- <TD>39</TD>
- <RNG>
- <D>10001</D>
- <H>20000</H>
- </RNG>
- <FA>2021-03-10</FA>
- <IDK>300</IDK>
- </DA>
- </CAF>
- </DD>
- </TED>
- </Documento>
- </DTE>';
- $cont = simplexml_load_string($dirXML);
- echo '<pre>';
- echo var_dump($cont->Documento->TED->DD->CAF->DA->RNG);
- echo var_dump($cont);
- echo '</pre>';
File Description
- lectura de XML desde un string
- PHP Code
- 17 Jun-2021
- 849 Bytes
You can Share it:
Latest PHP Pastes