Eduardo,
On Wed, Sep 22, 2010 at 3:24 PM, Eduardo Fernandes
<modals...@yahoo.com.br>wrote:
> Ella,
>
> The TXmlDocument already treat BOM mark on read method, please do a test
> wiht this sintax:
>
> oDoc := TXmlDocument():New( "aaa.xml", HBXML_STYLE_NOESCAPE )
>
>
In case of web programming, at client-side I'm working with streams, not
the hard-disk, and personally I prefer to cut out the BOM myself.
I suggest you to do the same, since the TXmlDocument has a cSignature
property filled in with the BOM, so you don't need to pass the BOM to the C
function, which does the parsing.
Best regards,
Ella
> regards,
> Eduardo
>
> --- Em *ter, 21/9/10, Ella Stern <ella.st...@xharbour.com>* escreveu:
>
>
> De: Ella Stern <ella.st...@xharbour.com>
> Assunto: [xHarbour-developers] TXmlDocument parser error because of Byte
> Order Mark
> Para: "xharbour developer list" <xharbour-developers@lists.sourceforge.net
> >
> Data: Terça-feira, 21 de Setembro de 2010, 16:48
>
>
> 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
>
>
> -----Anexo incorporado-----
>
>
> ------------------------------------------------------------------------------
> 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
>
> -----Anexo incorporado-----
>
> _______________________________________________
> xHarbour-developers mailing list
> xHarbour-developers@lists.sourceforge.net<http://mc/compose?to=xharbour-develop...@lists.sourceforge.net>
> https://lists.sourceforge.net/lists/listinfo/xharbour-developers
>
>
>
------------------------------------------------------------------------------
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