problem with wxXmlDocument from wxWidgets library
Illés Jaron
J.Illes at hunkeler.ch
Wed Dec 12 22:27:23 PST 2007
Hallo to all,
I tried to use wxXmlDocument from wxWidgets library,
the wxXmlDocument have 2 overload methods
virtual bool Load(const wxString& filename,
const wxString& encoding =3D wxT("UTF-8"), int flags =
=3D
wxXMLDOC_NONE);
virtual bool Load(wxInputStream& stream,
const wxString& encoding =3D wxT("UTF-8"), int flags =
=3D wxXMLDOC_NONE);
I didn't want to use this XML parser with physical file,
I like to send him the XML as string (or stream)
I try to implement this code bat obviously I need to somehow initiate
wxInputStream *_insb;
and this action I don't know how. someone can please help me ??
the doc object is declared like this:
wxXmlDocument doc;
the the code to implement:
bool XmlDocument::loadFromString(string _str)
{
char *p =3D (char*)_str.c_str();
wxInputStream *_insb;
bool _res =3D doc.Load(_insb->Read(p, _str.length()));
_insb =3D NULL;
return _res;
}
thank you
herzliche Gr=FC=DFe,
Jaron Ill=E8s
Softwareentwicklung
Hunkeler AG
Bahnhofstrasse 31
CH-4806 Wikon
Schweiz
phone +41/62 745 61 61 (switchboard)
phone +41/62 745 63 68 (direct)
fax +41/62 745 65 10
e-mail j.illes at hunkeler.ch<mailto:j.illes at hunkeler.ch>
www http://www.hunkeler.ch<http://www.hunkeler.ch/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wx-users/attachments/20071213/ca7=
8cee6/attachment.htm
More information about the wx-users
mailing list