473,386 Members | 1,830 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,386 software developers and data experts.

How to write XML to the rendered HTML page.

In code behind, I generate a string that I would like to have rendered to my
page so that my javascript can load it into a client side javascript xml
document.

If I use repsonse.write(txml), it puts it outside of the body of the
document. I also tried assigning it to a label.text, but the javascript can
not find it inside the span tag.

Is there a way to do it?

Thanks in advance.

txml = "<xml ID='oPriceBookDrops'>"

txml = txml & "<PBInfo>"

txml = txml & "<DataPoint>"

txml = txml & "<Product ProductName='Screen Printer'>"

txml = txml & "<ItemType ItemName='DEK'>"

txml = txml & "<PartSet>"

txml = txml & "<Part>123</Part>"

txml = txml & "<PartName>Printer1</PartName>"

txml = txml & "</PartSet>"

txml = txml & "</ItemType></Product>

txml = txml & "</PBInfo>"

txml = txml & "</XML>"
Nov 11 '05 #1
2 2077
you might want to to try again with <xml> and </XML> having the same case.
That`s an absolute requirement for a valid xml structure.

Brian Staff

Nov 11 '05 #2
You can add a xml webcontrol in your page ,and set the control's
DocumentContent property to your xml string.For further information ,you can
refer to .Net Framework SDK Documentation.

"Jim Mitchell" <ji**********@mindspring.com> дÈëÏûÏ¢ÐÂÎÅ
:eX**************@TK2MSFTNGP12.phx.gbl...
In code behind, I generate a string that I would like to have rendered to my page so that my javascript can load it into a client side javascript xml
document.

If I use repsonse.write(txml), it puts it outside of the body of the
document. I also tried assigning it to a label.text, but the javascript can not find it inside the span tag.

Is there a way to do it?

Thanks in advance.

txml = "<xml ID='oPriceBookDrops'>"

txml = txml & "<PBInfo>"

txml = txml & "<DataPoint>"

txml = txml & "<Product ProductName='Screen Printer'>"

txml = txml & "<ItemType ItemName='DEK'>"

txml = txml & "<PartSet>"

txml = txml & "<Part>123</Part>"

txml = txml & "<PartName>Printer1</PartName>"

txml = txml & "</PartSet>"

txml = txml & "</ItemType></Product>

txml = txml & "</PBInfo>"

txml = txml & "</XML>"


Nov 11 '05 #3

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

Similar topics

2
by: Faser | last post by:
Using Mozilla, I would like to open a new window and write an XML string. I would like the XML is properly rendered, but any attempts failed. The XML is always rendered as text and the page type is...
14
by: Hugh Welford | last post by:
Hi - trying to display a memo field using response.write but it truncates it. Is there a size issue with response.write? If so how do I get round it and to be able to display the whole memo field ...
4
by: Prowler | last post by:
In the application we are currently building, we need to write positioning code on-the-fly, based upon the screen offset of the element in the AS/400 application which drives the Web app. The 400,...
1
by: Rafael Veronezi | last post by:
I have a simple doubt about the Response.Write method... Follows... I have a page that do some processing before show up, it could take something like 10 or 15 seconds... But it's not the network...
1
by: SlimFlem | last post by:
I hope this makes sense. Here is what I am attempting. I have an inital generic aspx page that has one custom tag: <web:site id=webSite runat=server/> When this control evaluates, it will...
2
by: Patient Guy | last post by:
I don't think I have ever encountered something like this before. On a Windows XP running Apache 2.0.53 I do my page development (XP machine). I then upload the stuff to a Linux/Redhat/Fedora...
8
by: mosscliffe | last post by:
I am an old programmer, but a newbie to Visual Web Developer 2005 - Express Edition I have an .aspx Form Page with an attached Master File and an attached css file. I have scanned a text...
5
by: homertbush | last post by:
When our asp.net pages are rendered out as html the page directive is still in the html. ie. The following page directive is present in the body of the html of the rendered page: <%@ Page...
27
by: Inny | last post by:
The following 3 pages which are popups on my site are not rendering in mozilla firefox. Source is visible instead. Any idea why? ...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...

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.