XML reader

Post Reply
User avatar
goosfancito
Posts: 1955
Joined: Fri Oct 07, 2005 7:08 pm

Re: XML reader

Post 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.
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
User avatar
nageswaragunupudi
Posts: 10691
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: XML reader

Post 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
Regards

G. N. Rao.
Hyderabad, India
User avatar
goosfancito
Posts: 1955
Joined: Fri Oct 07, 2005 7:08 pm

Re: XML reader

Post 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.
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
Post Reply