XML Reader

XML Reader

Postby modicr » Sat Feb 26, 2011 2:08 pm

Hello!

Is there an XML reader for Harbour/FWH available?
Maybe something like PHP XMLReader pull parser:

http://www.ibm.com/developerworks/libra ... ngphp.html

Thanks, Roman
© I'm not patented!
User avatar
modicr
 
Posts: 207
Joined: Fri Oct 07, 2005 7:58 am
Location: ljubljana, barje, slovenia

Re: XML Reader

Postby frose » Sat Feb 26, 2011 5:16 pm

Roman,

I'm using TXmlDocument() to read from a XML file.

From the documentation:
Description
The TXmlDocument() class provides objects for reading and creating XML files. XML stands for eXtensible Markup Language which is similar to HTML, but designed to describe data rather to display it. To learn more about XML itself, the internet provides very good free online tutorials. The website http://www.w3schools.com is is a good place to quickly learn the basics on XML.
A TXmlDocument object maintains an entire XML document and builds from it a tree of TXmlNode() objects which contain the actual XML data. The first XML node is stored in the :oRoot instance variable, which is the root node of the XML tree. Beginning with the root node, an XML document can be traversed or searched for particular data. The classes TXmlIteratorScan() and TXmlIteratorRegEx() are available to find a particular XML node, based on its tag name, attribute or data it contains.

But it's an extension for xHarbour not for Harbour :(
Windows 11 Pro 22H2 22621.1848
Microsoft (R) Windows (R) Resource Compiler Version 10.0.10011.16384
Harbour 3.2.0dev (r2008190002)
FWH 23.10 x86
User avatar
frose
 
Posts: 392
Joined: Tue Mar 10, 2009 11:54 am
Location: Germany, Rietberg

Re: XML Reader

Postby IBTC » Mon Feb 28, 2011 7:54 pm

frose wrote:I'm using TXmlDocument() to read from a XML file.


me too.

frose wrote:But it's an extension for xHarbour not for Harbour :(


It is also available for Harbour. You only have to include xhb.lib, see also e.g. contrib/xhb/tests/xml1.prg
Best Regards,
Ruediger Alich

---
HMG 3.1.3 | FTDN/FWH 13.12 | Harbour 3.2 | BCC/MinGW | Windows XP/Vista/7/8/10 (32/64-Bit), Wine (Linux/Mac) - started 1999 with FW, 1989 with Clipper
User avatar
IBTC
 
Posts: 103
Joined: Sat Oct 18, 2008 8:13 pm
Location: Stuttgart, Germany

Re: XML Reader

Postby xProgrammer » Tue Mar 01, 2011 3:02 am

Hi Roman

I use TXml_Document class a lot in my Harbour code and have found it to be very good. Make sure you also check out the TXML_Iter* classes. It's really quite powerful and easy to use.

Regards
Doug
User avatar
xProgrammer
 
Posts: 464
Joined: Tue May 16, 2006 7:47 am
Location: Australia

Re: XML Reader

Postby modicr » Sat Mar 05, 2011 7:32 pm

Hello!

I have installed xHarbour 1.21 from http://free.xharbour.com/free.xHarbour. ... loads.html
but there is no xhb.lib. There are only rtl.lib, rtlmt.lib, harbour.lib and many others ...

Regards, Roman
© I'm not patented!
User avatar
modicr
 
Posts: 207
Joined: Fri Oct 07, 2005 7:58 am
Location: ljubljana, barje, slovenia

Re: XML Reader

Postby xProgrammer » Sun Mar 06, 2011 12:19 am

Hi Roman

My understanding is that as you are using xHarbour rather than Harbour you wouldn't have and wouldn't need xhb.lib because it is a Harbour library to provide Harbour users with xHarbour compatability.

Regards
Doug
User avatar
xProgrammer
 
Posts: 464
Joined: Tue May 16, 2006 7:47 am
Location: Australia

Re: XML Reader

Postby modicr » Sun Mar 06, 2011 3:50 pm

Aha, now I understand ... I use "Harbour 1.0.1dev Intl. (Rev. 9361)" and there is no xhb.lib inside it. So I thought that xhb.lib is part of xHarbour so I've installed it. But the truth is that I must use newer harbour. What is the latest that is compatible with FWH 9.01?

Thanks, Roman
© I'm not patented!
User avatar
modicr
 
Posts: 207
Joined: Fri Oct 07, 2005 7:58 am
Location: ljubljana, barje, slovenia

Re: XML Reader

Postby xProgrammer » Mon Mar 07, 2011 6:28 am

Hi Roman

I am using Harbour 2.0.0 (which most definitely has the xhb library) but I am using it under 64 bit Linux so I can't answer your latest question in any detail. But I am sure Antonio can.

Regards
Doug
User avatar
xProgrammer
 
Posts: 464
Joined: Tue May 16, 2006 7:47 am
Location: Australia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 67 guests