Patrick,

The problem is the MatchCriteria() method that always returns true.
Comment the line 221 and test. The find() method need be otimized to work with 
attribute, value and data arguments, if any.

regards,
Eduardo

--- Em seg, 4/5/09, Patrick Mast, xHarbour. <patrick.m...@xharbour.com> 
escreveu:

> De: Patrick Mast, xHarbour. <patrick.m...@xharbour.com>
> Assunto: Re: [xHarbour-developers] Bug in TXmlDocument class
> Para: "xHarbour Developers Mailing List" 
> <xharbour-developers@lists.sourceforge.net>
> Data: Segunda-feira, 4 de Maio de 2009, 5:33
> Anyone? ;-)
> 
> On Thu, Apr 23, 2009 at 3:10 PM, Patrick Mast, xHarbour.
> <patrick.m...@xharbour.com>
> wrote:
> > Hello,
> >
> > Please try this reduced sample:
> > [Files also attached]
> >
> > Thanks!
> >
> > Patrick
> >
> > #include "hbXml.ch"
> >
> > PROCEDURE Test()
> >
> >   LOCAL oXmlDoc, oXmlNode, oXmlRecScan,
> oXmlFieldScan
> >
> >   ? "-- Content of Sample.xml -----"
> >   ? "------------------------------"
> >   ? '<?xml version="1.0"?>'
> >   ? '<database>'
> >   ? ' <records>'
> >   ? '  <record>'
> >   ? '  
> <description>Jeff</description>'
> >   ? '  
> <description1>14001</description1>'
> >   ? '   <description2>1st
> Computers</description2>'
> >   ? '  </record>'
> >   ? ' </records>'
> >   ? '</database>'
> >   ? "------------------------------"
> >
> >   oXmlDoc:= TXmlDocument():new()
> >   oXMlDoc:read( Memoread( "Sample.xml" ) )
> >
> >   oXmlNode      := oXmlDoc:findFirst( "records" )
> >   oXmlRecScan   := TXmlIteratorScan():new( oXmlNode
> )
> >   oXmlNode      := oXmlRecScan:find( "record" )
> >   oXmlFieldScan := TXmlIteratorScan():new( oXmlNode
> )
> >
> >   ?
> >   ? "oXmlFieldScan:find( 'description' ):cData = '"
> +
> > oXmlFieldScan:find( 'description' ):cData + "'"
> >   ? "--> OK"
> >
> >   ?
> >   ? "oXmlFieldScan:find( 'description1' ):cData = '"
> +
> > oXmlFieldScan:find( 'description1' ):cData + "'"
> >   ? "--> NOT Ok, should be '14001'"
> >
> >   ?
> >   ? "oXmlFieldScan:find( 'description2' ):cData = '"
> +
> > oXmlFieldScan:find( 'description2' ):cData + "'"
> >   ? "--> NOT Ok, should be '1st Computers'"
> >
> >   ?
> >   ?
> >   wait
> >
> > RETURN
> >
> 
> ------------------------------------------------------------------------------
> Register Now & Save for Velocity, the Web Performance
> & Operations 
> Conference from O'Reilly Media. Velocity features a full
> day of 
> expert-led, hands-on workshops and two days of sessions
> from industry 
> leaders in dedicated Performance & Operations tracks.
> Use code vel09scf 
> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
> _______________________________________________
> xHarbour-developers mailing list
> xHarbour-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/xharbour-developers
> 


      Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com

------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
xHarbour-developers mailing list
xHarbour-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xharbour-developers

Reply via email to