Page 1 of 1

Re: XML reader

Posted: Fri Nov 17, 2023 9:30 am
by goosfancito
Hola a todos,

Si tengo que ingresar a este nodo "DatiGeneraliDocumento"
<FatturaElettronicaBody>
<DatiGenerali>
<DatiGeneraliDocumento>

para poder obtener un dato, como hago? porque "DatiGeneraliDocumento" tengo varios

pensé que podía hacer esto pero no funciona:

Code: Select all | Expand

   oNodo    := oxmldoc:findFirst("FatturaElettronicaBody", "DatiGenerali", "DatiGeneraliDocumento")
Gracias.

Re: XML reader

Posted: Fri Nov 17, 2023 7:55 pm
by nageswaragunupudi
FWH has an old forgotten/less known function

Code: Select all | Expand

FW_XmlView( [filename.xml] )
If the function is called without parameters, it provides a file picker to choose an xml file and display.

Please try with xHarbour to view any xml file with any complexity.

Important Note: This function is not now working with Harbour. Has some bugs. Working with some files and fails with some other files.
For now please try with xHarbour only.

Simple xml.prg:

Code: Select all | Expand

#include "fivewin.ch"

function Main()

   FW_XmlView()

return nil
Sample:
Image

Re: XML reader

Posted: Fri Nov 17, 2023 8:38 pm
by goosfancito
Hola.
Estoy necesitando extraer los datos de un xml, por eso necesito saber como hago para extraer los datos de una determinada rama. gracias.