On the server, you can add an XML Web control as shown below....
Dim xml_doc As New System.Xml.XmlDocument
Dim s_xml
Dim temp
s_xml = ""
s_xml = s_xml & "<xml id=" & Chr(34) & "kkk" & Chr(34) & ">"
s_xml = s_xml & "<people id=" & Chr(34) & "kkk" & Chr(34) & ">"
s_xml = s_xml & "<kids>"
s_xml = s_xml & "<kid>Bill</kid>"
s_xml = s_xml & "<kid>Frank</kid>"
s_xml = s_xml & "<kid>Mike</kid>"
s_xml = s_xml & "</kids>"
s_xml = s_xml & "</people>"
s_xml = s_xml & "</xml>"
xml_doc.LoadXml(s_xml)
Xml1.Document = xml_doc
On the client, you can read this code with Javascript as follows.....
<script language="javascript">
xml_doc = new ActiveXObject("Microsoft.XMLDOM");
xml_doc.async = false;
xml_doc = document.getElementById("kkk")
root = xml_doc.documentElement;
root.getElementsByTagName("kid").item(0).text = "Mike was added"
window.alert("Here is the first kid... " +
root.getElementsByTagName("kid").item(0).text)
window.alert("Here it is... " + root.xml)
</script>
I hope this helps a bit. I just posted, how do I get it back to the server
and then saw your post. I know you can just set the root.xml to a textbox
and then postback, load the XML web control with the value of textbox1.text.
Jim
"Mr. x" <a@b.com> wrote in message
news:OG**************@TK2MSFTNGP11.phx.gbl...
Hello,
I have build xml by xmldom on runtime (on server)
(it is only in memory, and doesn't in any file).
How can I move the xml context from the server to client & vice versa ?
Thanks :)