You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xerces.apache.org by steven <du...@gmail.com> on 2007/02/17 21:50:26 UTC
xerces with gcc on windows xp
hi,
im using xerces with gcc compiler on windows xp(cygwin).
i'm a java developer, but im not that familiar with c++.
can somebody show me a small example on writing a c++ string object
from a XMLCh string( if fiesable).
i will try meanwhile to work on it, maybe i'll end up with something.
thanks
steven
Re: xerces with gcc on windows xp
Posted by Suzy Creamcheese <di...@yahoo.com>.
The samples packages provide these simple classes for transcoding strings
class StrX
{
public:
StrX(const XMLCh * const toTranscode) :
l(XMLString::transcode(toTranscode))
{
}
~StrX(void)
{
XMLString::release(&l);
}
inline const char * local(void) const
{
return l;
}
private:
char * l;
};
class XStr
{
public:
XStr(const char * const toTranscode) :
u(XMLString::transcode(toTranscode))
{
}
~XStr(void)
{
XMLString::release(&u);
}
inline const XMLCh * unicode(void) const
{
return u;
}
private:
XMLCh * u;
};
You could I guess modify the method
inline const char * local(void) const
{
return l;
}
To be
inline std::string local(void) const
{
return l;
}
steven-62 wrote:
>
> hi,
> im using xerces with gcc compiler on windows xp(cygwin).
> i'm a java developer, but im not that familiar with c++.
> can somebody show me a small example on writing a c++ string object
> from a XMLCh string( if fiesable).
> i will try meanwhile to work on it, maybe i'll end up with something.
> thanks
> steven
>
>
>
>
>
--
View this message in context: http://www.nabble.com/xerces-with-gcc-on-windows-xp-tf3246094.html#a9540786
Sent from the Xerces - C - Users mailing list archive at Nabble.com.