Home » U++ Library support » U++ Core » XML parsing error
| XML parsing error [message #16836] |
Wed, 16 July 2008 13:23  |
TeCNoYoTTa
Messages: 138 Registered: July 2008 Location: Egypt
|
Experienced Member |
|
|
hello
i am sorry if my Question was boring for you to solve but i dont know what is the proplem
i made this structer and class
struct message
{
String title;
String body;
String popup;
String link;
String attachment;
};
class news
{
private:
message Current_Message;
String sender;
public:
news(XmlParser Xml_File)
{
while(!Xml_File.IsTag())
Xml_File.Skip();
Xml_File.PassTag("root");
while(!Xml_File.IsEof())
{
if(Xml_File.Tag("new"))
{
if(Xml_File.Tag("message"))
{
while(!Xml_File.End())
{
if(Xml_File.Tag("title"))
Current_Message.title = Xml_File.ReadText();
if(Xml_File.Tag("body"))
Current_Message.body = Xml_File.ReadText();
if(Xml_File.Tag("popup"))
Current_Message.popup = Xml_File.ReadText();
if(Xml_File.Tag("link"))
Current_Message.link = Xml_File.ReadText();
if(Xml_File.Tag("attachment"))
Current_Message.attachment = Xml_File.ReadText();
else
{
Xml_File.Skip();
continue;
}
Xml_File.PassEnd();
}
}
else if(Xml_File.Tag("sender"))
{
sender = Xml_File.ReadText();
}
else
Xml_File.Skip();
}
}
}
message GetMessage()
{
return Current_Message;
}
String GetSender()
{
return sender;
}
};
this class takes xmlparser as constructor
and put the data in the private variables
when i call it from here
CISNotifier::CISNotifier() //project constructer
{
CtrlLayout(*this, "Window title");
HttpClient client;
client.URL("http://cisclub.com/tecno/bta3/XML.xml");
String content;
content = client.ExecuteRedirect();
XmlParser p(content);
news obj(p);
message m = obj.GetMessage();
String s = obj.GetSender();
static_text.SetText(s);
}
the program links but it dont work :S :S
please help me
you can check the xml file as the link is in the code
|
|
|
|
Goto Forum:
Current Time: Tue Apr 28 21:29:19 GMT+2 2026
Total time taken to generate the page: 0.00666 seconds
|