Ver Mensaje Individual
  #1  
Antiguo 13-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
Crear fichero XML

Estoy adaptando un generador de recibos a la normativa XML del SEPA. Tengo este código (de momento):
Código:
_di_IXMLNode iNode0, iNode1, iNode2, iNode3, iNode4, iNode5, iNode6;

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

XMLDocument1->DocumentElement = XMLDocument1->CreateElement("Document","urn:iso:std:iso:20022:tech:xsd:pain.008.001.02");
iNode0 = XMLDocument1->DocumentElement->AddChild("CstmrDrctDbtInitn");
     iNode1 = iNode0->AddChild(WideString("GrpHdr"));
          iNode2 = iNode1->AddChild(WideString("MsgId"));
          iNode2->SetNodeValue("PRE" + Now().FormatString("yyyymmddhhnnss") + "00000" + fDiaCar->F_cargo->Date.FormatString("yyyymmdd"));
          iNode2 = iNode1->AddChild(WideString("CreDtTm"));
          iNode2->SetNodeValue(Now().FormatString("yyyy-mm-dd'T'hh:nn:ss"));
          iNode2 = iNode1->AddChild(WideString("NbOfTxs"));
          iNode2->SetNodeValue(FormatFloat("0", nRecibo));
          iNode2 = iNode1->AddChild(WideString("CtrlSum"));
          iNode2->SetNodeValue(StringReplace(FormatFloat("0.00", nImporte), ",", ".", oReplace));
          iNode2 = iNode1->AddChild(WideString("InitgPty"));
               iNode3 = iNode2->AddChlid(WideString("Nm"));     // Da error aquí
               iNode3->SetNodeValue(cInstala[0]);
               iNode3 = iNode2->AddChlid(WideString("Id"));     // Da error aquí
                    iNode4 = iNode3->AddChild(WideString("OrgId"));
                         iNode5 = iNode4->AddChild(WideString("Othr"));
                         iNode5->SetNodeValue("ES" + Modulo9710(fSocios->cInstala[4] + "ES00") + fSocios->cInstala[5] + fSocios->cInstala[4]);
Pero, no sé por qué, me da un error de compilación ('AddChild' is not a member of 'IXMLNode') en la definición de iNode3, pero no en las de iNode4 e iNode5. ¿Alguna idea?
Responder Con Cita