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>"


0
8/20/2003 10:22:08 PM
dotnet.xml 7266 articles. 0 followers. Follow

2 Replies
540 Views

Similar Articles

[PageSpeed] 14

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

0
Brian
8/20/2003 10:52:24 PM
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" <jim_mitchell@mindspring.com> д����Ϣ����
:eXIp6m2ZDHA.2308@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>"
>
>



0
neoasp (1)
8/20/2003 11:47:42 PM
Reply:

Similar Artilces:

XML Custom serialization
Hi all, I want to serialize a class in a customized way. But I don't want to implement the ISerializable interafce because I don't want to take care of every new field I insert to the class. What I need is a way to customize the serialization of a specific field in my class but leave the rest to the build-in serialization. Any guidance will be appreciated. Ro'ee <sfa.roy@gmail.com> wrote in message news:7243a1eb-3fa3-43e0-8339-d90f890e6716@b1g2000hsg.googlegroups.com... > Hi all, > > I want to serialize a class in a customized way. But I don't want to >...

Dont wanna see images in HTML mails !
Outlook 2002 Is there any way to make Outlook NOT display images in HTML-formated messages ??? Sick of seeing porn stuff and shit in spam mails ! thanks ...

What page am I on?
I want to print out the transactions between certain dates from an account. When I try to print, I am not asked the date range, but I am asked asked what page(s) I want to print. I don't know how to find the page numbers which contain the data I want to print. I looked in the help file and didn't find any helpful information. I'll appreciate some assistance. Chuck In microsoft.public.money, Chuck Bollinger wrote: >I want to print out the transactions between certain dates from an >account. When I try to print, I am not asked the date range, but I am >asked as...

Send Page By E-Mail (Office/Outlook 2003 AND IE) HELP
Hi, I am having a problem with the "send page by e-mail" feature in the ms word add-on/plugin. I navigate to a page the refers me to a word document http://some/some.doc when I request this document it loads it into IE and then I want to send it as an attachment in an email by choosing "send page by email"; The version of outlook 2003 attaches the document as html not .doc. This is only happening on outlook 2003. In the older version of outlook the word document is attached to the email correctly. In outlook 2003 it attached the document as .html and it is un-readable. ...

Autoflow bug when publishing to html
I made a newsleter, some text boxes auto flowed into others, saved as html, no proble later I edited the file in publisher and after publishing as html I noticed the previous typing persisted so I now had duplicate paragraphs, looked bad in explorer looked ok in publisher To fix it I pasted the text into separate boxes without autoflow and it worked o Still having a problem where I cant mass mail the publication, I get an instant reply from outloo Your message did not reach some or all of the intended recipients Subject: News from Lease +Loan Maste Sent: 2/18/2004 2:23 P The fol...

Beter WEB Access Login page like OWA
Is there a third party add-on or a option from Microsoft to add a better web access login page like Exchange OWA has? I want to publish this via the internet for remote sales users, but wont do this until I can secure it via SSL. I am working right now on a SSL certificate for this process but would rather use a process like Forms Authentication in OWA. Any ideas? ...

Is there a way for Windows Service to Read/Write HKCU Reg key ?
Hi: I'm writing a Windows Service program which needs to read/write the HKEY_CURRENT_USER registry key for the current logged on user. I know that for a Windows service does not have concept of HKCU since it is always running in SYSTEM's context. But is there a way (trick?) for a service to access the HKCU registry key? Thanks In Advance ! Polaris Hello Try, from a user application (the one that is logged on, or the current user), to send the services the user's SID. Then access the HKCU through HKEY_USERS\users_sid\............ Hope that helps, Elias "Polaris&qu...

Write
I am trying to change the default margins. I am requested to use the Write mode to do this. What is Write, and how do I access it? Are you using voice recognition? Margins are simply changed in the Arrange Menu in Publisher. Are you in the right newsgroup? -- Mary Sauer MS MVP http://office.microsoft.com/ http://www.mvps.org/msauer/ news://msnews.microsoft.com "CBC" <anonymous@discussions.microsoft.com> wrote in message news:183bb01c44a40$107bd5d0$a501280a@phx.gbl... > I am trying to change the default margins. I am requested > to use the Write mode to do this. W...

Receiving html imbedded email
I cannot receive email I am sent from certain sources. For example, if someone sends me a newpaper article from an online paper, I don't get it, although it is viewable through my webmail account. Another example would be someone who sends me an email with an eBay listing in it - - I don't get the email at all. Anyone that could help? Thanks! ...

CSV to XML, now to validate
hiya, I have a 3rd party function that converts a CSV to an XML doc. I now need to validate the xmlDoc.I understand that I need a valid XSD for the newly created xmlDoc, but the xmlDoc contains no schema definitions etc.I'm not sure how to create an XSD, so that the fields are restricted to "integer" datatypes etc. Been looking for a while.I assume that I don't have to manually write an XSD?maybe I should create a "dummy" table in sqlServer, then generate a dataset to get the XSD?Or, maybe vis studio 2003 has tools to make this easier? Any suggestions appreciated...

print chart on full page
Hi, a basic print question. I have charts on several workshhets I am printing. Some of them print and take up the whole page, the background is greyed out. I want that for the rest of my charts but can't figure out what setting to use? I have tried the page setups print "print full page" which is how those charts are set or the "scale to fit page" setting but changing those is not working. Can someone tell me what I am missing? Thanks, Todd Move to a chart sheet. Don Guillett SalesAid Software donaldb@281.com "Todd" <Todd@discussions.microsof...

How to add a Page Total to Report
I'm a newbie to SSRS having only spent time on the fairly basic SSRS elearning tutorial. I have a basic matrix report, that shows multiple pages. I'd like to show a total across all pages. How would I achieve this? Thank you, Mark Mark ="Page " & Globals!PageNumber & " of " & Globals!TotalPages "Mark" <Mark@discussions.microsoft.com> wrote in message news:3CF396EC-643C-4E47-961B-E75DA523FF0B@microsoft.com... > I'm a newbie to SSRS having only spent time on the fairly basic SSRS > elearning tutoria...

Writing formula for excel worksheet
Item Rate1 Rate2 Rate3 A 3 4 6 B 8 5 23 C 56 5 78 Above is my excel sheet. I want to write some formula so that in every row cell having minimum rate should come bold. Like For Item A - Rate1(3) for Item B - Rate2(5) For Item C - Rate2 (5) There may be a neater way but this works. Somewhere in you sheet in a cell type =min(A1:a4), I used L1 Change this to watever range you are trying to evaluate. Then select this range and click format - conditional format - cell value - is equal to =($L$1) and apply your bold font. The lowest value in the range will then become bold. Mike "Gaur...

Cannot write to memory location
I can not (all of the sudden) run Publisher in the last week. When starting to run it, I get that it cannot write to a certain memory locaiton, so it is shutting down. I need to get this program working. I have read through this forum and tried the different fixes as well as the knowledge base (emptied the temp file, disabled anti-virus, etc.) but it still won't work. An example is: "The instruction at "0x77f585c0" referenced memory at "0x00000000". the memory could not be "written". Click on OK to terminate the program." The header read...

How do I force sent mails to be plain text, not HTML?
Hi, In OE6 there is a handy feature "Reply to msgs using the format in which they where sent" in Tools - Options - Send. When I want to force each outgoing email to be sent as plain text, I just uncheck that (and select plain text as Mail Sending Format). AFAICT there is no way to do that in OE2000, ar am I missing something? TIA! Mike - Oops! Typo! Please read: "AFAICT there is no way to do that in OE2000, ar am I missing something?" - Cool! You cloaked your email addy! LOL "Jim Pickering" <&#106&#105&#109&#112&#64&#109&#118&a...

Universal "Look For" to get to a contact from any page
I suggest that there be a universal "Look For" quick find box that looks at areas determined by the user (ex. contacts and accounts) from ANYWHERE in CRM. It would save time. Thank you for listening. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://w...

XSLT: Creating anchors from outer XML files
Hi, I'm trying to put the links (href attribute of the <a> element) out of my XSLT files, in a XML file, and read it from the stylesheet. I suppose that I have to use the document() function to link to the XML file containing the URLs, but I don't know how to do it. I've tried something like this: This is XML file containing the URLs (link.xml): <?xml version="1.0" encoding="utf-8" ?> <LINKS> <L1> /SomePage.aspx </L1> </LINKS> And this is the code from the stylesheet: <a href="{document('link.xml')/L...

write protect/write redirect/kios mode
Hey, I LOVE snapshots in virtualmachines and think it would be awesome to have something like this for my main windows install. Anyone know of any hardware/software to redirect writes to another drive/file/memory/hardware? Or hardware to write protect a drive for kios's (i found some once befor the reverted all changes on shutdown, but cant find it anymore ><) I know VSS(virtual shadow copy service) has a function to redirect on write and wondering if i might be able to use that :/ It will just make everything cleaner, and give alot of flexiblity to setting up ...

how do i write checkbox to.....
This is a multi-part message in MIME format. --------------050607000103070200020407 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit how do i write checkbox1 boolean to xml in vb6 i can only do cstr( checkbox1.value) but in vb.net can't write to xml. i am doing irc chat similar to mirc or pirch chat. rw.WriteConfigInfo("User Modes", chkInvisible.Text, chkInvisible.Checked, "PirateChat.xml") in procedure events: ' Both the Key and the Value are filled ' Find the key ...

xml to flat file
Hi. Is there any way of using an xml schema file to a. validate the xml data then writing the xml out as a flat flat. For example in the schema it would say the element has a maximum length of 10 characters and therefore when it is written out as text the value is 10 characters ? <field1>hello</field1> <field2>all</field2> flat file would be hello_____all thanks ...

practice sessions won't download get error on page
Training excel 2003- "practice in excel" will not download a spreadsheet. Also, the little + that allows you to see what's in a chapter will not open. Bottom of page says "error on page". How do I get this to work? ...

Extend the XML Schema via C# objects
I have C# objects/entities (like person or customer) which contains the usual amount properties/attributes like name, address and so on.. I would like to "tag" some of these properties, so that when I'm generating and XML Schema (via Wsdl for instance) the tags are displayed in the Schema portion of the Wsdl. Something like the following snippet: <?xml version="1.0" encoding="utf-8"?> <xs:scheme attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" ...

Rotate page buttons grayed out
I've dragged a landscape pdf into onenote and need to rotate it, but the rotate buttons are grayed out. Any ideas? Curt wrote: > I've dragged a landscape pdf into onenote and need to rotate it, but > the rotate buttons are grayed out. The rotate tool only works for drawings. For images the "Image Rotator Powertoy"[1] will do the job. When importing PDFs and other things the "Printout Manager" Powertoy[2] will be of help too. HTH Rainald [1] http://blogs.msdn.com/johnguin/archive/2007/12/14/image-rotator-powertoy-for-onenote-2007.aspx [2...

Write access to a LDAP server.
Is there any way to enable write access in Outlook to my LDAP server? The LDAP server allows this functionality, Outlook doesn't. Any plugins that can do this? Thanks. Derek ...

xml and updategram
I have been searching for quite a while for an example of how to use javascript and xml dom to create updategrams and to send them back to my sql server. I have a webpage where I use javascript to add, edit or delete rows from an <xml> object. I can load it from sql server. I cannot find out how to use updategrams to get it back to the sql server. I would appreciate being pointed to an example. thank you mark ...