Subj : Re: helpfile.js
To : Tracker1
From : MCMLXXIX
Date : Mon Sep 21 2009 02:00 pm
Re: Re: helpfile.js
By: Tracker1 to MCMLXXIX on Sun Sep 20 2009 15:41:22
> Use XML, I know some won't like it.. but here goes...
>
https://developer.mozilla.org/En/E4X/Processing_XML_with_E4X
>
> help.xml
> <help>
> <section id="yourIdentifier">
> ..content here...
> </sectionName>
>
> <section ...>
> ...
> </section>
> ...
> </help>
>
> read the file in with a...
> var f = new File(...);
> if (!f.open("r", true))
> throw "Unable to open help file '" + filename + "'.";
> var helpXml = new XML(f.readAll().join(""));
>
> you now have an E4X based XML object you can read in your information
> from...
>
> var sectionContent = helpXml.section.(@id == "yourIdentifier");
>
> This will give you the content within a given section... :)
Thanks for the ideas. I honestly had no idea JS had support for XML.
My synchronet build is ancient, relative to everything else going on here.
Guess it's time to update.
---
� Synchronet � The BRoKEN BuBBLE (MDJ.ATH.CX)