Re: XML Transformation Effectiveness.
- From: "Christopher J. Hahn" <cjhahn@xxxxxxxxx>
- Date: 21 Jul 2005 05:11:02 -0700
Bucco wrote:
> I was actually looking for a server independant app like TiddlyWiki.
> TiddlyWiki uses Javascript, css, and html to generate a dynamically and
> saveable one file wiki without the need for a server. This allows the
> user to take the html document anywhere with them without being
> restricted to a server with server side scripts.
>
> The thing I want to do is very similar, accept I want to add an XML
> file to store data that is added through the HTML interface. The XML
> data can then be pulled back out and displayed through the HTML
> interface.
>
> Does this make sense?
>
> Thanks:)
>
> SA
If I understand correctly (and I'm not really familiar with much of
XML/XHTML), XHTML is a subset of XML. Hence, anything XHTML is by
definition also XML.
If this is the case, then the JS interface to the DOM should work
perfectly for your needs, with some minor divergences.
Use document.createElement to create a node, for instance.
document.appendChild to append the node as the last child of
another.
et cetera.
Use an external CSS file, imported using a <link> node, for
presentation.
As far as saving it, you can do one of two things:
1. Turn down security settings in IE for the local zone, then use the
ActiveX FileSystemObject to open a file and write the source of your
manufactured document to it.
2. Output the source in, say, a textarea, from which you can copy and
subsequently paste into a text editor and manually save.
Both ways are a bit kludgy, but what you end up with is a file that you
created from JavaScript, with source that acts as both XHTML and XML.
You can subsequently import it from the local filesystem using an
<object> or <iframe>, or access it directly. I don't think that
XMLHTTPRequest would work on the local filesytem, but it might.
You don't necessarily have to make it XHTML, I don't think, but I don't
see why you wouldn't.
Don't know if that helps any, but I hope it does.
.
- Follow-Ups:
- Re: XML Transformation Effectiveness.
- From: Christopher J. Hahn
- Re: XML Transformation Effectiveness.
- References:
- XML Transformation Effectiveness.
- From: Bucco
- Re: XML Transformation Effectiveness.
- From: VK
- Re: XML Transformation Effectiveness.
- From: Bucco
- Re: XML Transformation Effectiveness.
- From: VK
- Re: XML Transformation Effectiveness.
- From: Bucco
- XML Transformation Effectiveness.
- Prev by Date: Re: Select list without a helper button
- Next by Date: Re: RegExp for hyphen to camelCase?
- Previous by thread: Re: XML Transformation Effectiveness.
- Next by thread: Re: XML Transformation Effectiveness.
- Index(es):
Relevant Pages
|