c++ - Poco::DOMParser and wstring -


is there way makepoco::domparser work std::wstring?

i build pocoxml lib defined xml_unicode , xml_unicode_wchar_t. i'm trying compile code this:

poco::xml::domparser parser; std::wstring xml = getxml(); //init string xml document  // cannot compile, cause parsestring wants std::string // not wstring poco::autoptr<poco::xml::document> document = parser.parsestring(xml);  

poco::xml::saxparser can parse std::wstring , poco::xml::domparser use saxparser build document. have no idea why cannot pass std::wstring parsestring.

maybe cannot use parsestring, there way parse std::wstring domparser?

you should able use std::wstring on windows xml_unicode_wchar_t defined. on posix platforms, you'll have make sure wchar_t 2 bytes wide (check __sizeof_wchar_t__ define). practice use xmlstring, appropriately defined std::basic_string, based on xml_unicode_wchar_t define.

there problem prevents poco::xml compilation xml_unicode_wchar_t, though. github issue has been created , problem fixed in develop branch 1.5.3 release.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -