ambiera logo

Ambiera Forum

Discussions, Help and Support.

folder icon Ambiera Forum > irrXML
forum topic indicator Reading/Parsing xml file
person icon
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?

person icon
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.

person icon
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:










 

  

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


icon_holyicon_cryicon_devilicon_lookicon_grinicon_kissicon_monkeyicon_hmpf
icon_sadicon_happyicon_smileicon_uhicon_blink   






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