Let me just try to recap the story.
You want to select different parts of javascripts and group them together
probably using some kind of factory pattern. (Since this is great for
grouping look a lot alike things)
Then you are going to store the data in an XML file using a dom document
which you can find in System.Xml (you may have to register an extra assembly
to your project)
You can do this by simple adding a new Node and filling the .text of that
Node with your JavaScript. You may need to do something extra to make sure
the xml stays valid ( a <![CDATA[]]> something like that) tag. otherwise your
parser won't make heads or tails out of the data anymore.
Does this answer your question, or am I just blabbing away ??
--
Rainier van Slingerlandt
www.slingerlandt.com
Please hit the Yes button If my effort is helpfull.
"Yama" wrote:
Hi,
Yes but I would prefer to copy the content of my filename.js into an XML
file then retrieve them by resding from them. I am not interested in writing
to an XML file.
Once I figured out how to save script data into an XML file I can figure out
how to read from it.
Thanks,
~yamazed
"Bruce Barker" <br******************@safeco.com> wrote in message
news:uk**************@TK2MSFTNGP12.phx.gbl... use the xmlwriter or dom, they will handle the incoding.
-- bruce (sqlwork.com)
"Yama" <ya**@yamabiz.com> wrote in message
news:%2***************@tk2msftngp13.phx.gbl... Hi,
I have 20 javascript files I would like to dynamically write to my
rendered web page. What I would like to do is instead of saving them into
a database table save them into a XML file then retrieve them according
to user selection. The question is how do I do that?
How can I save into a XML text and special character?
For example:
<script language=javascript>
<!--
alert("hello world") ;
// times another few 100s of line of code
-->
</script>
Question:
How can I save this into a XML file then get the row dynamically during
runtime?
Thanks,
~yamazed