Ver Mensaje Individual
  #3  
Antiguo 14-01-2015
Avatar de Angel.Matilla
Angel.Matilla Angel.Matilla is offline
Miembro
 
Registrado: ene 2007
Posts: 1.350
Reputación: 19
Angel.Matilla Va por buen camino
Gracias por la respuesta. El código que tengo ahora es este (decartando las cabeceras del formato SEPA):
Código:
_di_IXMLNode iNode0, iNode1, iNode2, iNode3, iNode4, iNode5, iNode6, iNode7;

XMLDocument1->Active   = false;
XMLDocument1->FileName = "";
XMLDocument1->Active   = true;

XMLDocument1->DocumentElement = XMLDocument1->CreateElement("Document","urn:iso:std:iso:20022:tech:xsd:pain.008.001.02");
[...]
iNode2 = iNode1->AddChild(WideString("DrctDbtTxInf"));
     iNode3 = iNode2->AddChild(WideString("PmtId"));
          iNode4 = iNode3->AddChild(WideString("EndToEndId"));
          iNode4->SetNodeValue(fSelSoc->Lista->Items->Item[nItem]->SubItems->Strings[1]);
     iNode3 = iNode2->AddChild(WideString("InstdAmt"));
     iNode3->Attributes["Ccy"] = "EUR";
     iNode3->SetNodeValue(StringReplace(StringReplace(Lista->Items->Item[nItem]->SubItems->Strings[4], "€", "", oReplace), ",", ".", oReplace));
Al grabar el fichero lo hace así:
Código:
<DrctDbtTxInf>
  <PmtId>
    <EndToEndId>4160</EndToEndId>
  </PmtId>
  <InstdAmt Ccy="True"/>
</DrctDbtTxInf>
Compila bien, pero al ejecutar me da esete error en línea SetNodeValue:

Va pro delante: Parte de los datos los saco de un TListView que está en un formulario que sigue abierto.
Responder Con Cita