Ver Mensaje Individual
  #1  
Antiguo 12-06-2014
Avatar de olbeup
olbeup olbeup is offline
Miembro
 
Registrado: jul 2005
Ubicación: Santiago de la Ribera (España)
Posts: 685
Reputación: 19
olbeup Va camino a la fama
Nomeclatura de Nodos en XML

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];

    // Creación del ficehro XML
    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';

    // Cabecera 
    // -----------------------------
    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.
__________________
Al hacer una consulta SQL, haz que los demás te entiendan y disfruten de ella, será tú reflejo de tú saber.

Última edición por olbeup fecha: 12-06-2014 a las 14:09:46.
Responder Con Cita