Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > irrXML
Aren't XML strings supported?

Paul
Guest
Quote
2010-07-29 01:56:01

Looking through the source, it looks like createIrrXMLReader() takes in a char* as well, so the whole library should be able to operate on strings just as well as files.
I have this very simple XML file that contains this text:
<main number="1"/><A param1="1.5"/><param2="1.5"/>


and this is successfully parsed when I start with
 IrrXMLReader* xml = createIrrXMLReader("config.xml"); 



But if I have a
 char* XMLpacket[someLength] 
that contains this exact same information in ascii characters as the file, the parser no longer works if I use this:

IrrXMLReader* xml = createIrrXMLReader( XMLpacket );


Basically, the main parser loop ( while(xml && xml->read()) ) exits immediately.

I tried terminating the array with combinations of CR, LF, null, etc. with no results.

What am I missing?


erik
Registered User
Quote
2010-07-29 12:17:14

irrXML expects XMLpacket to be a file. So it tries to open a file named like the content of your xml file.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "In?ernational" (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