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
delphi delphi-xe2


source to share


No one has answered this question yet

Check out similar questions:

12
MessageLoop inside a thread
8
custom namespace for nested enums in Delphi
7
Determine if a point is inside a polygon?
five
Namespaces in Delphi XE2
4
Reading values ​​from XML using namespaced child nodes
3
Changing the value of the XML node attribute gives "Namespace error"
1
Namespace and Units
1
Can MSXML XPath select attributes? (UPD: the real problem was with the namespace without the default prefix)
0
Invalid values ​​in the SQLDA structure
0
Invalid Delphi XE3 pointer when trying to free FSQL (TStringList)



All Articles
Loading...
X
Show
Funny
Dev
Pics