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 Olumide <50...@web.de> on 2012/05/21 15:01:09 UTC

Converting std::string to XMLByte* / Working with MemBufInputSource

Hi,

Is safe/legitimate to cast a const char* to XMLByte*? Or is there better 
way of performing this conversion?

I'm trying to use SAX2XMLReader::parse(const InputSource & source) in 
order to parse from a MemBufInputSource which I would to initialize from 
(the c_str() method of) an std::string.

Regards,

- Olumide

Re: Converting std::string to XMLByte* / Working with MemBufInputSource

Posted by Olumide <50...@web.de>.
On 21/05/2012 14:19, Alberto Massari wrote:
> Yes, it's safe to use a cast; both are 8 bits.

Thanks.

Re: Converting std::string to XMLByte* / Working with MemBufInputSource

Posted by Alberto Massari <Al...@progress.com>.
Yes, it's safe to use a cast; both are 8 bits.

Alberto

Il 21/05/2012 15:01, Olumide ha scritto:
> Hi,
>
> Is safe/legitimate to cast a const char* to XMLByte*? Or is there better
> way of performing this conversion?
>
> I'm trying to use SAX2XMLReader::parse(const InputSource&  source) in
> order to parse from a MemBufInputSource which I would to initialize from
> (the c_str() method of) an std::string.
>
> Regards,
>
> - Olumide
>