| Ver tema anterior :: Ver tema siguiente |
| Autor |
Mensaje |
josetm Cdt

Registrado: 03 Oct 2006Mensajes: 9Ubicación: Tenerife
|
Publicado: Mie 11 Oct, 2006 12:04 pm Asunto: descargar un fichero xml |
|
|
| hola, que tal, necesito obtener un documento en xml, he conseguido descargarlo con tcppwebbrowser pero al guardarlo o pasarlo a texto obtengo el documento html que haría visible en un navegador la estructura del documento, y yo quiero obtener el xml tal cual. ¿alguna idea? |
|
| Volver arriba |
|
 |
josetm Cdt

Registrado: 03 Oct 2006Mensajes: 9Ubicación: Tenerife
|
Publicado: Mie 11 Oct, 2006 2:06 pm Asunto: me contesto a mi mismo |
|
|
usando este codigo que encontre en el foro, cambiando la linea comentada por la liena que yo he añadido lo hago. Lo siento por las molestias.
| Código: | IHTMLDocument2 *HTMLDocument;
IHTMLElement *pElement;
wchar_t *tmp;
AnsiString texto;
if (PNav->Document) {
PNav->Document->QueryInterface(IID_IHTMLDocument, (void**)&HTMLDocument);
HTMLDocument->get_body(&pElement);
// pElement->get_innerHTML(&tmp);
pElement->get_innerText(&tmp);
texto = AnsiString(tmp);
pElement->Release();
HTMLDocument->Release();
}
memo->Text = texto;
memo->Lines->SaveToFile("tiempo.xml"); |
|
|
| Volver arriba |
|
 |
|