Namespace in IXMLNodeList

I need to put a prefix in a node, but the IXMLNodeList that are defined in the interface also add a NameSpace and it needs a prefix for all nodes

  if Length(cds_Partes.FieldByName('Nota').AsString) > 0 then
     Nota.Add( cds_Partes.FieldByName('Nota').AsString);
   OtrosCargos .Add.Codigo := 'V6';
   OtrosCargos.Items[0].Monto :=  cds_Traslado.FieldByName('Importe').AsString;

      

interface

 function Get_Proyecto: IXMLFactura_proyecto;
 function Get_Nota: IXMLNotasList;
 function Get_CargosCreditos: IXMLFactura_cargosCreditosList;
 function Get_OtrosCargos: IXMLFactura_otrosCargosList;
 .........

function Getfactura(Doc: IXMLDocument): IXMLFactura;
 begin
  Result := Doc.GetDocBinding('PPY:factura', TXMLFactura, TargetNamespace) as    IXMLFactura;
end;

function Loadfactura(const FileName: string): IXMLFactura;
begin
 Result := LoadXMLDocument(FileName).GetDocBinding('PPY:factura', TXMLFactura,  TargetNamespace) as IXMLFactura;
end;

function Newfactura: IXMLFactura;
 begin
  Result := NewXMLDocument.GetDocBinding('PPY:factura', TXMLFactura, TargetNamespace) as IXMLFactura;
end;    

      

Result

 <PPY:destino codigo="8476" nombre="PLANTA DE MOTORES 4 CILINDROS - SALTILLO"/>

 <nota xmlns="http://www.dfdchryslerdemexico.com.mx/Addenda  /PPY">Addenda de  Prueba</nota>

 <otrosCargos xmlns="http://www.dfdchryslerdemexico.com.mx/Addenda/PPY" codigo="V6" monto="1373.93"/>

      

Prefix

exists in the target node, not node NOTA and OTROSCARGOS,

at what point is NameSpace added?

There are a lot of tanks

+3


source to share





All Articles