Using irrXML to update/change files

Post your questions, suggestions and experiences regarding game design, integration of external libraries here. For irrEdit, irrXML and irrKlang, see the
ambiera forums
Post Reply
MickeyKnox
Posts: 58
Joined: Tue Apr 10, 2007 7:49 pm
Location: Karlsruhe

Using irrXML to update/change files

Post by MickeyKnox »

I just wanted to use irrXML for a preferences file for my game, but i did'nt find it suitable (or maybe i'm missing something).

So far i understand it, irrXML can only read an xml file at once resp. write it at once?

This would not really satisfie my needs, althought i found an example in some other Thread, where someone created its own xml class, reading everything in, and the Destructor writes everything out.
That would probably work for me too, but i would find it a distress solution, if no one comes with a better idea.

I would like to illustrate, what i'm thinking of:

Code: Select all

MyXMLFile.getNode(nodeIdentifier).getAttributeValue(attributeIdentifier);

MyXMLFile.getNode(nodeIdentifier).setAttributeValue(attributeIdentifier, newValue);
This includes in the first place reading and writing in an arbitrary order with only one XML object.

I also noticed, that there is no such thing, like a getNode(nodeIdentifier) function, but getNodeSomething() from the current node, which i don't find satisfying

Thanks for any suggestions ~
Post Reply