Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > irrXML
Reading/Parsing xml file

User
Guest
Quote
2012-11-28 21:47:35

Does this parser still work? I ask because i've added the source to my project, but it doesn't appear to read the files. My code is pretty simple:


IrrXMLReader* xml = createIrrXMLReader("sample.xml");

while(xml && xml->read())
{
MessageBox("Inside While Loop", "Confirmation", MB_YESNO | MB_ICONQUESTION);

switch(xml->getNodeType())
{
case EXN_TEXT:
break;
case EXN_ELEMENT:
break;
}
}
delete xml;


My XML file is the sample one from the example. The MessageBox is for debugging purposes.

So what i've found is it opens the file, but the call to read fails. xml->read() returns 0 every time. I've tried multiple XML files... they all fail.

So what am I doing wrong?


erik
Registered User
Quote
2012-11-29 05:57:45

It probably cannot find your file. Check if your working directory is really the one you thing it is. To be sure, open the file with its absolute filename.


User
Guest
Quote
2012-12-04 19:58:21

I'm still not sure how to get this working... i put the full pathname to the file inside the createIrrXMLReader call and it still couldn't find the file.

I'm out of ideas here... Here's what I changed it to:


IrrXMLReader* xml = createIrrXMLReader("D:\\bin\\config\\ini\\sample.xml");




Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Intern?tional" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact