Hola Compañeros,
Cuando pongo en el encabezado "fe:facturae" del XML, el resto de los nodos me añade el "fe:" en todo, ejemplo:
Código Delphi
[-]...
begin
XMLInit := TXMLDocument.Create(nil);
XMLInit.Active := True;
XMLInit.Version := '1.0';
XMLInit.Encoding := 'UTF-8';
XMLInit.StandAlone := 'yes';
XMLInit.NodeIndentStr := ' ';
XMLInit.Options := XMLInit.Options + [doNodeAutoIndent];
XMLMain := XMLInit.AddChild('fe:Facturae');
XMLMain.Attributes['xmlns:ds'] := 'http://www.w3.org/2000/09/xmldsig#';
XMLMain.Attributes['xmlns:fe'] := 'http://www.facturae.es/Facturae/2009/v3.2/Facturae';
XMLFileHeader := XMLMain.AddChild('FileHeader');
TextXML := XMLFileHeader.AddChild('SchemaVersion');
TextXML.Text := '3.2';
TextXML := XMLFileHeader.AddChild('Modality');
TextXML.Text := 'I';
TextXML := XMLFileHeader.AddChild('InvoiceIssuerType');
TextXML.Text := 'EM';
...
...
XMLInit.SaveToFile('C:\PruebasXML\MyXMLFactura-e.xml');
end;
y cuando lo abro, aparece:
Código:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<fe:Facturae xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:fe="http://www.facturae.es/Facturae/2009/v3.2/Facturae">
<fe:FileHeader>
<fe:SchemaVersion>3.2</fe:SchemaVersion>
<fe:Modality>I</fe:Modality>
<fe:InvoiceIssuerType>EM</fe:InvoiceIssuerType>
...
...
Como puede eviar que aparezca el "fe:" en todos los nodos, solo lo quiero al principio y al final.
Un saludo.