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

Reply via email to