Hello,

The below test was made on Vista with xBuilder Enterprise built
on 08/30/2010.
Today I've received a real-life XML file, generated by third-party
mainstream software.
The below test code gives parsing error code 4 with the XML file.
After opening the XML file with WordPad and doing a SAVE operation, the test
code is working correctly.

I've analyzed the original XML file, and it starts with a BOM ( in hexa is
EFBBBF so little endian unicode in this case )
After doing the saving operation with WordPad the BOM is vanished and my
test code has no problem with parsing the XML file.

Is it possible to enhance the XML implementation to reckognize the four Byte
Order Marks ?


Ella




#include "hbxml.ch"

function main()
   local cFile:="aaa.xml", cString
   local oDoc
   cString:=memoread( cFile )
   if !( len(cString) > 0 )
      wait "xml file unavailable"
      return NIL
   endif
   oDoc:=TXmlDocument( cString, HBXML_STYLE_NOESCAPE )
   if !( oDoc:nError==HBXML_ERROR_NONE )
      wait "xml file parsing error " + str(oDoc:nError)
      return NIL
   endif

   wait "ok"
return NIL
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
xHarbour-developers mailing list
xHarbour-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xharbour-developers

Reply via email to