You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Thomas Ford <to...@decisionsoft.com> on 2002/07/25 14:42:39 UTC

DOMString deprecated in Xerces 2.0

I'm currently moving some code over from Xerces 1.7 -> Xerces 2.0 which 
uses DOMString heavily (many hundreds of occurrences).

It's difficult to implement certain functions (eg. those previously 
returning const DOMString objects) are tough to implement using raw 
XMLCh * pointers.

Hence I'd be inclined to write a reference counted String class wrapping 
XMLCh *.

However, given that this is pretty much what DOMString did, before doing 
so I'd be interested to know if such a wrapper class was planned in the 
immediate future of Xerces or, indeed, what the recommended way of 
handling strings in Xerces-C 2 now is.

Pointers and XMLString:: leads to very verbose code and extensive use of
explicit delete.

Regards,

Tom Ford

-- 
Tom Ford, Software Engineer           DecisionSoft Ltd.
Telephone: +44-1865-203192            http://www.decisionsoft.com


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


RE: DOMString deprecated in Xerces 2.0

Posted by Lenny Hoffman <le...@earthlink.net>.
Hi Tom,

I don't know what the official plans are, but I created a version of
DOMString that while is not reference counted, does wrap a raw XMLCh* and
employs COW.  This may work for what you want.  I have attached it for your
convenience.

Cheers,

Lenny

-----Original Message-----
From: Thomas Ford [mailto:tom@decisionsoft.com]
Sent: Thursday, July 25, 2002 7:43 AM
To: xerces-c-dev@xml.apache.org
Subject: DOMString deprecated in Xerces 2.0


I'm currently moving some code over from Xerces 1.7 -> Xerces 2.0 which
uses DOMString heavily (many hundreds of occurrences).

It's difficult to implement certain functions (eg. those previously
returning const DOMString objects) are tough to implement using raw
XMLCh * pointers.

Hence I'd be inclined to write a reference counted String class wrapping
XMLCh *.

However, given that this is pretty much what DOMString did, before doing
so I'd be interested to know if such a wrapper class was planned in the
immediate future of Xerces or, indeed, what the recommended way of
handling strings in Xerces-C 2 now is.

Pointers and XMLString:: leads to very verbose code and extensive use of
explicit delete.

Regards,

Tom Ford

--
Tom Ford, Software Engineer           DecisionSoft Ltd.
Telephone: +44-1865-203192            http://www.decisionsoft.com


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org