By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,372 Members | 1,289 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,372 IT Pros & Developers. It's quick & easy.

how to parse an xml message in std::string (C++) using xerces sax2

P: n/a
Hi,

How do I parse an xml message that is in std::string using sax2 parse
method that does not seem to take a string and expects a filename?

Thanks.

Sep 6 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a

mu**********@gmail.com < mu**********@gmail.comwrote in
<11**********************@k79g2000hse.googlegroups .com>:
How do I parse an xml message that is in std::string using
sax2 parse method that does not seem to take a string and
expects a filename?
The API reference seems to indicate you'd have to construct
a MemBufInputSource from your std::string (statically cast
a pointer to the first character to XMLByte*), then supply
the resulting object as a parameter to the overloaded
parse() member function.

--
This chickenus crossed the roadus while yodelingus.
Sep 6 '07 #2

P: n/a
The API reference seems to indicate you'd have to construct
a MemBufInputSource from your std::string (statically cast
a pointer to the first character to XMLByte*), then supply
the resulting object as a parameter to the overloaded
parse() member function.
Thanks Pavel. It works now. Found some more useful info in
MemParse.cpp from 'samples' too.

Cheers.
Sep 6 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.