473,406 Members | 2,371 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

XML that is built on runtime

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 :)

Nov 11 '05 #1
3 1289
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 :)

Nov 11 '05 #2
Thanks...
If I do in the server something like :

newnode = jokes_list.createElement("mynode")
' ??? newnode.id = "root_xml" ' doesn't work - what should I put here ?
jokes_list.documentElement = newnode

If I don't create elements using tags, as your example,
what should I put in the line of "???" ?

Thanks :)

"Jim Mitchell" <ji**********@mindspring.com> wrote in message
news:uX*************@TK2MSFTNGP11.phx.gbl...
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 :)


Nov 11 '05 #3
Thanks,
by the way, I have tried to copy the sample to my code,
what is Xml1 ? How is it declared ?

Thanks :)
"Mr. x" <a@b.com> wrote in message
news:eB**************@TK2MSFTNGP12.phx.gbl...
Thanks...
If I do in the server something like :

newnode = jokes_list.createElement("mynode")
' ??? newnode.id = "root_xml" ' doesn't work - what should I put here ? jokes_list.documentElement = newnode

If I don't create elements using tags, as your example,
what should I put in the line of "???" ?

Thanks :)

"Jim Mitchell" <ji**********@mindspring.com> wrote in message
news:uX*************@TK2MSFTNGP11.phx.gbl...
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 :)



Nov 11 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Terje Slettebø | last post by:
Hi. I'm new here, and sorry if this has been discussed before; I didn't find it searching the PHP groups. (I've also read recommendations to cross-post to the other PHP groups, but if that is...
4
by: Yasutaka Ito | last post by:
Hi, Is there a way to determine which version of .NET Framework any given assembly is built with? thanks! -Yasutaka
5
by: Venky | last post by:
We have a strange error here. We have an application that is built in VC++ 6.0 and uses a C library built using the same. Now, we have migrated to .Net and have used the same source code to be...
6
by: Alan Johnson | last post by:
For various reasons I'd like to be able to inherit from the built in types, which obviously you cannot do. To get around this, I made a template to emulate the built in types. So far I can't find...
4
by: Prigozhin Roman | last post by:
I'm trying to create a com object, code looks fine for me ( like other com objects I've created ) but this time I'm getting error : "There are no registrable types in the built assembly" Anyone...
1
by: Daniel | last post by:
is there any way to get to a unique build verion of an assembly at runtime? e.g. a version that is unique to the time that the assembly was built?
48
by: meyer | last post by:
Hi everyone, which compiler will Python 2.5 on Windows (Intel) be built with? I notice that Python 2.4 apparently has been built with the VS2003 toolkit compiler, and I read a post from Scott...
4
by: scubasteve | last post by:
Hi, I'm having issues with AC2007 custom ribbons. I'm building an AC2007 runtime app which has a custom ribbon (called CommandsDisabledHideRibbon) set as the default db ribbon name (see XML at...
55
by: tonytech08 | last post by:
How valuable is it that class objects behave like built-in types? I appears that the whole "constructor doesn't return a value because they are called by the compiler" thing is to enable...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.