Why did I click "Send" so fast! ;-) Files are attached NOW. Patrick
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 >
Node.prg
Description: Binary data
<?xml version="1.0"?> <database> <records> <record> <description>Jeff</description> <description1>14001</description1> <description2>1st Computers</description2> </record> </records> </database>
------------------------------------------------------------------------------ Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________ xHarbour-developers mailing list xHarbour-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xharbour-developers