realbasic-games
[Top] [All Lists]

Re: XML examples?

To: REALbasic Games <realbasic-games at lists dot realsoftware dot com>
Subject: Re: XML examples?
From: Dustin Evermore <devermore at devermore dot net>
Date: Mon, 27 Jun 2005 01:18:05 -0500
Delivered-to: realbasic-games at lists dot realsoftware dot com
References: <7F558F94-4698-4812-A9F8-06A31FE9B737 at gmail dot com>
I figured it out for my UniForge program <http://www.devermore.net/ UniForge/> by looking at tutorials at <http://www.w3schools.com/>. I use XML to both store program data, to store preferences as well as to save files being worked on. RB will do transforms on XML files which allows me to do very nice HTML, text, and wiki code output.

Querying is very very fast when you load the XML object into memory. That's how I extract information from xml data files after I load the object into memory (which again I find to be incredibly fast using the RB functions). The LoadXML method of the xmldocument class does this for me. Then extract what data you need using the XQL method of the xmlnode class (this is the superclass to xmldocument). XPaths is a big topic, something which w3schools above can help with as well as these XPath tutorials here <http://www.zvon.org/xxl/XPathTutorial/ General/examples.html>.

Saving data is pretty simple and there are useful examples for that in the RB Language guide. Where I had to learn new stuff was with the figuring out the XPath syntax to use in the xql method, but once you dig into it, it's not bad at all.

Hope this helps,
DE

On Jun 26, 2005, at 11:14 AM, Joel Reymont wrote:

Folks,

Could you please point me to examples of using the XML parser (DOM, SAX) in RB?

Someone mentioned there's a nice example in the Example Projects download but I could not find it there.

    Thanks, Joel

--
http://wagerlabs.com/tech


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>



_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>
  • XML examples?, Joel Reymont
    • Re: XML examples?, Dustin Evermore <=