Hi all
I just tracked down a problem with some code I wrote using TXmlDocument:FindFirst() function. The xml data looked like this:
<TABLE>
<TABLE-NAME>Whatever</TABLE-NAME>
FindFirst( "TABLE-NAME" ) was not nil but its cData property was nil whereas it should be "Whatever". It turned out that FindFirst( "TABLE-NAME" ) was returning the <TABLE> node, ie cName was "TABLE" and cData was nil.
Once I discovered that I tried SET EXACT ON which fixed the problem. This dependance on the setting of SET EXACT isn't in my xHarbour documentation. Maybe I can save someone some trouble by mentioning it in this forum.
xProgrammer
If you use TXmlDocument:FindFirst()
- xProgrammer
- Posts: 464
- Joined: Tue May 16, 2006 7:47 am
- Location: Australia
Re: If you use TXmlDocument:FindFirst()
Use expresion regular;
FindFirstRegex( "^TABLE-NAME$" )
Regards
FindFirstRegex( "^TABLE-NAME$" )
Regards
Saludos
Rafa Carmona ( rafa.thefullARROBAgmail.com___quitalineas__)
Rafa Carmona ( rafa.thefullARROBAgmail.com___quitalineas__)