xmlreader

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
lobbin

xmlreader

Post by lobbin »

Is there any way to use IXMLReader without having to create a device?
puh
Posts: 356
Joined: Tue Aug 26, 2003 3:53 pm

Post by puh »

No.
Use EDT_NULL device instead.
Armen138
Posts: 298
Joined: Mon Feb 23, 2004 3:38 am

Post by Armen138 »

is there any way to use the xml reader at all? it still crashes
Tyn
Posts: 932
Joined: Thu Nov 20, 2003 7:53 pm
Location: England
Contact:

Post by Tyn »

@Armen: Crashes? I got it working in my project, albeit there are a few things that aren't working properly, I've never crashed it.
Last edited by Tyn on Wed Jun 02, 2004 11:53 am, edited 3 times in total.
lobbin

Post by lobbin »

Like this I guess?

createDevice(video::EDT_NULL);

However, this creates a segfault under Linux.
Armen138
Posts: 298
Joined: Mon Feb 23, 2004 3:38 am

Post by Armen138 »

at the end of the reading loop it segfaults, maybe its a linux-specific problem?

Code: Select all

 io::IXMLReader* xml = device->getFileSystem()->createXMLReader("./yards/leveldata/yardx.xml");

	  core::stringc bspfile;

 while(xml && xml->read())

        {

                switch(xml->getNodeType())

                {

					case io::EXN_ELEMENT:

                        {

                                if (core::stringw("bsp0") == xml->getNodeName())

                                        bspfile = xml->getAttributeValue(L"filename");		

								}

							break;								

							}}	

							xml->drop();						
Post Reply