Ver Mensaje Individual
  #3 (permalink)  
Antiguo 30/08/2010, 14:15
thebug
 
Fecha de Ingreso: agosto-2010
Mensajes: 2
Antigüedad: 13 años, 7 meses
Puntos: 0
Respuesta: DOMDocument CON XML

Cita:
Iniciado por danielfl1234 Ver Mensaje
LO QUE QUIERO ES HACER UN XML DE ESTA MANERA.
<?xml version="1.0" encoding="ISO-8859-1" ?>
- <m:Facturae xmlns:m="http://www.facturae.es/Facturae/2007/v3.0/Facturae">
- <FileHeader>
<SchemaVersion>3.0</SchemaVersion............


$doc = new DOMDocument();
///Y LO REALIZO CON EL
$doc->loadXML('<m:Facturae > <FileHeader>
<SchemaVersion>3.0</SchemaVersion>
<Modality>I</Modality>
<InvoiceIssuerType>EM</InvoiceIssuerType>
<Batch>

PERO NO PUEDO METER EL CONTENIDO .xmlns:m="http://www.facturae.es/Facturae/2007/v3.0/Facturae

COMO LO PONGA ME DA ERROR Y NO ME GENERA BIEN EL XML

se me pasaba

este es son lo los errores que que me da

Warning: DOMDocument::loadXML() [domdocument.loadxml]: Unescaped '<' not allowed in attributes values in Entity, line: 2 in C:\AppServ\www\servi\xmlfacturasfirmadas.php on line 315

Warning: DOMDocument::loadXML() [domdocument.loadxml]: error parsing attribute name in Entity, line: 2 in C:\AppServ\www\servi\xmlfacturasfirmadas.php on line 315

Warning: DOMDocument::loadXML() [domdocument.loadxml]: attributes construct error in Entity, line: 2 in C:\AppServ\www\servi\xmlfacturasfirmadas.php on line 315

Warning: DOMDocument::loadXML() [domdocument.loadxml]: Couldn't find end of Start Tag Facturae line 1 in Entity, line: 2 in C:\AppServ\www\servi\xmlfacturasfirmadas.php on line 315
mira esto http://phpbuilder.com/manual/en/domdocument.savexml.php, de esa manera no tendras problemas