From: Ildar <ild...@gm...> - 2006-09-29 14:17:54
|
> > However, 2 more questions: > > > > #1 > > > > wxString s3 = node.Find(wxT("level2-1")).GetFirstChild().GetName(); > > > > result: > > s3 == "text" // as you mentioned > > > > but > > > > wxString s4 = node.Find(wxT("level2-1")).Get(wxT("text")); > > > > result: > > s4 == "" > wxXml2Node::Get returns a wxXml2Node, not a wxString. I don't know why > the compiler accepts the assignment of a wxXml2Node to a wxString... > couldn't you trace it with a debugger and see what happens? Sorry, the code is as follows wxString s4 = node.Find(wxT("level2-1")).Get(wxT("text")).GetContent(); Btw, wxString s5 = node.Find(wxT("level2-1")).Get(wxT("text")).GetName(); result: s5 == "" |