[jdom-interest] hex v. dec
Ken Roberts
ken at 9ci.com
Thu Oct 21 17:07:40 PDT 2004
It occurs to me just now that maybe the best approach is to make it
parse according to the standards we all expect. "123" for decimal,
"0x3E" for hex, etc. That would require no interface change, but would
suddenly work for new numeric bases in a standard way.
On Wed, 2004-10-20 at 03:43, Bradley S. Huffman wrote:
> JDOM always escapes with the hex notation and doesn't provide a way to
> change that. However escapeElementEntities and escapeAttributeEntities
> are the only methods that use EscapeStrategy and are public in XMLOutputter
> so you could extend it, cut and paste those two methods, and change the
> 2 lines with Integer.toHexString to Integer.toString. Maybe not the most
> elegant solution, but it should work.
>
> Brad
>
> "Mark C. Stafford" writes:
>
> > Hello,
> >
> > I'm working with MySQL and Microsoft's Great Plains (Pains). GP is not
> > happy with unicode characters unless they're escaped *using decimal
> > notation*. Neither have I succeeded in defining an ENTITY that it
> > accepts.
> >
> > I've implemented an EscapeStrategy which is working well, but have not
> > found a property or method that will allow me to choose to "degrade"
> > the encoding.
> >
> > ñ crashes, but ñ (tested by hand) works.
> >
> > I'm holding up a data conversion. Can you help me? Is this the right
> > place to ask? I thought I'd check before resorting to some sort of
> > String-based re-parsing with regexp...
> >
> > Thanks,
> >
> > Mark
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <eConnect xmlns:dt="urn:schemas-microsoft-com:datatypes">
> > <SMCustomerMasterType>
> > <taUpdateCreateCustomerRcd>
> > <!-- <snip/> -->
> > <ADDRESS1>Villa España Zaragoza</ADDRESS1>
> > <!-- <snip/> -->
> > </taUpdateCreateCustomerRcd>
> > </SMCustomerMasterType>
> > </eConnect>
> > _______________________________________________
> > To control your jdom-interest membership:
> > http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com
> _______________________________________________
> To control your jdom-interest membership:
> http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.jdom.org/pipermail/jdom-interest/attachments/20041022/b94920ac/attachment.htm
More information about the jdom-interest
mailing list