Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » Error in XML Read
Error in XML Read [message #40119] Sat, 15 June 2013 06:04 Go to next message
Shwetha is currently offline  Shwetha
Messages: 39
Registered: August 2011
Member
Hi,

How to read or skip Comment Tag with in the Tag ??

Attached is the test file which I am trying to read..

Following is the error I get while reading the file:

Expected 'Message' endtag.



  • Attachment: TestFile.xml
    (Size: 0.99KB, Downloaded 216 times)
Re: Error in XML Read [message #40126 is a reply to message #40119] Sun, 16 June 2013 19:19 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
I will need to know more about your code. Quick test:

#include <Core/Core.h>

using namespace Upp;

CONSOLE_APP_MAIN
{
	try {
		XmlNode xn = ParseXML(LoadFile(GetHomeDirFile("TestFile.xml")));
		DDUMP(AsXML(xn));
	}
	catch(XmlError& e) {
		DDUMP(e);
	}
}


seems to work just fine...

Mirek

Re: Error in XML Read [message #40127 is a reply to message #40126] Mon, 17 June 2013 06:07 Go to previous messageGo to next message
Shwetha is currently offline  Shwetha
Messages: 39
Registered: August 2011
Member
Hi Mirek,

Thank you for your response...I tried your code and could read the file ..

But ,

Attached is my Code ..where I am parsing Tag by Tag and find error while parsing "Message" Tag.

How do I solve this ???
  • Attachment: TestXML.zip
    (Size: 1.73KB, Downloaded 209 times)
Re: Error in XML Read [message #40128 is a reply to message #40127] Mon, 17 June 2013 10:06 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Use

msg1 = p.ReadTextE();


Explanation: Comments are normally skipped by Skip. ReadText (without E) only reads single element from XML, but on its own is not able to skip anything. ReadTextE reads all text until ending tag, skipping things as needed.

Mirek
Re: Error in XML Read [message #40129 is a reply to message #40128] Mon, 17 June 2013 12:55 Go to previous message
Shwetha is currently offline  Shwetha
Messages: 39
Registered: August 2011
Member
All right ..

Thank u Mirek !!
Previous Topic: Bug in Core/Stream.cpp
Next Topic: Vector performance on a specific situation
Goto Forum:
  


Current Time: Sat Apr 20 04:31:40 CEST 2024

Total time taken to generate the page: 0.01843 seconds