Displaying XML in an .aspx page

I am trying to create an xml page on the fly using asp.net with vb.
I am currently reading data from my database into a dataset and then
using the xmlwriter() to output it to the clients screen.
But.............. i want to be able to edit the content which comes
out, i have to add some exta nodes which are static in between the
database records.

So i have created a loop which reads through the database and outputs
the records.
however i have tried to output it using response.write(database
record)
this outputs the data but does not display correctly in the browser.
when viewing the source code all the tags are there but its not
displayed correctly.

any help greatly appreiciated...
0
9/16/2003 4:13:09 PM
dotnet.xml 7266 articles. 0 followers. Follow

2 Replies
403 Views

Similar Articles

[PageSpeed] 44

IE display XML file by applying a style sheet to translate the XML file into
HTML first, then let IE display it on the screen. If your result is in pure
Xml, you can try to set the content type to text/xml instead of text/html to
let IE display the file for you. If the Xml file is part of page content,
then you need to translate the XML file into HTML yourself.

Here is the link:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnexxml/html/xml04212000.asp

points to a sample app which contains the  mimedefault.xsl which you can use
for XML -> HTML transformation.

Howard Hao

-- 
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.


"john" <j.w.horlock@leeds.ac.uk> wrote in message
news:8456800a.0309160813.79107e35@posting.google.com...
> I am trying to create an xml page on the fly using asp.net with vb.
> I am currently reading data from my database into a dataset and then
> using the xmlwriter() to output it to the clients screen.
> But.............. i want to be able to edit the content which comes
> out, i have to add some exta nodes which are static in between the
> database records.
>
> So i have created a loop which reads through the database and outputs
> the records.
> however i have tried to output it using response.write(database
> record)
> this outputs the data but does not display correctly in the browser.
> when viewing the source code all the tags are there but its not
> displayed correctly.
>
> any help greatly appreiciated...


0
sqldev (66)
9/16/2003 6:30:29 PM
If you just want the Text (innerXML) to display load the Text of the Item
such as

ds=new dataset
ds.ReadXml(path)
ds.Tables(ndx).Rows(ndx)("item") <-- where item is text to display

use a labelcontrol to display that text

Check out

http://www.arlingtonsoccer.org/?section=11

This page displays text that is presisted in an XML file

XML Source

http://www.arlingtonsoccer.org/data/xml/AnD.xml

The XML is first HtmlEncoded, then UrlEncoded.



"john" <j.w.horlock@leeds.ac.uk> wrote in message
news:8456800a.0309160813.79107e35@posting.google.com...
> I am trying to create an xml page on the fly using asp.net with vb.
> I am currently reading data from my database into a dataset and then
> using the xmlwriter() to output it to the clients screen.
> But.............. i want to be able to edit the content which comes
> out, i have to add some exta nodes which are static in between the
> database records.
>
> So i have created a loop which reads through the database and outputs
> the records.
> however i have tried to output it using response.write(database
> record)
> this outputs the data but does not display correctly in the browser.
> when viewing the source code all the tags are there but its not
> displayed correctly.
>
> any help greatly appreiciated...


0
sampsons (2)
9/16/2003 7:02:08 PM
Reply:

Similar Artilces:

xml, dataset, datalist
Dear ASP.NET Programmers, I need your help on the following case: 1. I have a page coverpage.aspx, on which I load invoice data into the datalist control dliHospCosts. I use the stored procedure spGetHospAmounts and load the data. <ItemTemplate> <TABLE id="Table77" width="100%"> <TR> <td align="left" width="7%" valign="top"> <asp:button id="btnEditItemHosp" runat="server" Text="Edit" CommandName="edit"></asp:button>&a...

Outlook 2000 not displaying holidays
I can't seem to get them to display. I note that when I pull down the 'events' list it shows holidays from 01/01/98 through 12/31/02 only and that appears to be the problem. Is there a way to import holidays to update the program? ...

GP9 on 64 bit, home page display problem
I have GP9 up and running on two 64 bit servers and I have only one problem, the homepage is displayed incorrectly. Only two icons are displayed and no background images show up. I dug into the code of the "HomePage.xsl" and found the problem. The code uses a function called "base href" to set a variable, @basehref. Whenever @basehref is called, the working directory of the HomePage.xsl is substituted into the code. This is usually an elegant way to code, since the upstream directory structure can change and the code doesn't skip a beat. The problem is, on the 64 bit se...

How to suppress last page blank
I have a report comprised of a page header, page detail, page footer and report footer. With some uses of the report, the unbound item in the report footer does not apply, so the control is made non-visible. Since that's the only item in the report footer, I would like to suppress the report footer altogether. Thinking that all I had to do was make that section non-visible I found that the last page continues to display empty, except for the page header and page footer. How can I suppress the essentially empty page altogether? Thanks, Bill A better solution to this issue would be to t...

Automatically cycle thru pages in preview
I want to be able to open a report in Preview Mode and then have it automatically cycle through the pages of the report. The purpose is to project the report on a screen and have it display page after page and, when it reaches the end, start all over. I have been able to get this to work to some extent using "SendKeys and "Sleep" commands. The Sleep command was done by putting the following in a general module: Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) Basically, I have a button on a form with an OnClick procedure that does t...

Multiple email aliases but emails sent to always show same display
Have an AD account that has multiple SMTP email addresses. However, any emails sent to one of them always show being sent to the users display name so theres no easy way to tell exactly what email address it was sent to. Does anyone know what we can do? Only thing I can thing of is creating separate AD accounts for this emails but that is a way too long winded. Thanks In news:690D8C4F-06FB-4F62-9265-CBDDFC350DA7@microsoft.com, Monkey <Monkey@discussions.microsoft.com> typed: > Have an AD account that has multiple SMTP email addresses. However, > any emails sent to one of the...

Creating multiple page reports
A query delivers somuch data that I can not put all the information on one page. Is it possible to create nice and neat multiple page reports? Thanks for suggestionsand answersto the above question? Ron RoBo wrote: >A query delivers somuch data that I can not put all the information on one >page. Is it possible to create nice and neat multiple page reports? Multiple page reports are the normal, everyday kind of report. You must be doing something unusual. Maybe someone could make a suggestion if you described the records returned by your query and how you want the data displaye...

Outllok 2007 display problem
Outlook is open and working fine, I go to do something else on the computer and when I return to Outlook I can see the pane showing all the folders on the left, Inbox with message headers in the middle but the display pane shows: "Cannot display the folder. Exited without properly closing your Outlook data file ......\....\Outlook.pst" I have to shut down the program and restart it and all is ok for a while then back to above. This has happening frequently for the last 3 days or so. I've not done anything different than normal in Outlook - I wouldn't know how to exi...

CRM should not display Tracking tokens, hide them!
When emails are sent from an acitvity in CRM, the system appends a TRACKING TOKEN to the suject line of the email. This tracking token should not be visible to the user. You should allow a CRM administrator to turn off "System generated" messages, but leave CRM tracking of emails on. ---------------- 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 W...

can you import an excell spreadsheet from a scanned page
Can you import a spreadsheet from a scanned spreadsheet. Hi very difficult. You may try an OCR software for this (should come with your scanner) -- Regards Frank Kabel Frankfurt, Germany "gerry" <gerry@discussions.microsoft.com> schrieb im Newsbeitrag news:C03F5CCB-5C19-4B68-B79E-96D5ABA8C857@microsoft.com... > Can you import a spreadsheet from a scanned spreadsheet. ...

How to change the page orientation on one page in publication
I'm working on a publication and I need to change the page orientation to landscape on several pages, but not the entire document. How would I do that? Thanks, You can't in the way you're thinking. However............you can start a new document in landscape, layout the page you need, select all, group it, copy it, and then paste it into the portrait oriented document. Rotate it 90�. (You can ungroup if you need to move anything around individually after it's been inserted into the target document.) -- JoAnn Paules MVP Microsoft [Publisher] "JuneJ" <J...

Chart display & printing
I have been creating some very detailed charts. When they are opened on defferent computers, they display and print totally different. This is by size of font, text boxes, and total charts size. Even when you open it in a window (not full screen) it is all squeezed together and distorted. How do I "lock" this so it displays the same for everyone. Thanks! I hope Rich ...

Public folder calendar items display differently
We use Public Folders for some of our calendar items. If I use OWA a calendar event is different than when I use full Outlook. For example, an appointment will be a different day and hour, but all the contents of the appointment are the same from OWA and Outlook. This is not the case for all our appointments just some of them. Has anyone else seen this who may have a resolution for the problem? Thanks, Chris ...

re arranging page order
I have a multi page document that I am hoping to print out like a book. However, I am trying to change the order of the pages and can't figure out how to do it. Any help? You should be able to just drag and drop the pages at the bottom of the screen (the little numbered ones). "Sherpa" wrote: > I have a multi page document that I am hoping to print out like a book. > However, I am trying to change the order of the pages and can't figure out > how to do it. Any help? What size are your pages? Does your printer support 11 x 17 (tabloid)? If it does, setup ...

How can I toggle a Yes/No check box and display value in adjoining field ?
Hi I have a test form with two fields. The first field is a Yes/No checkbox. The second field is a text box that I want to display "checked" if the checkbox is checked and "unchecked" if the checkbox is not checked. Now, if I check the checkbox the text box displays "checked". However, if I uncheck the checkbox, "checked" remains in the text box. I want to the text box to toggle between "checked" and "unchecked" when I check and uncheck the checkbox. Please let me know how I can accomplish this and thanks in advance for your hel...

display email forwarding
Running exchange 2003 sp2. How can i turn off the email forwarding banner that appears in outlook 2003? a user is complaing that they dont want to see the note in outlook that tells them when they forwarded on the email. Thanks On Mon, 31 Oct 2005 09:41:46 -0800, "skip" <skip@discussions.microsoft.com> wrote: >Running exchange 2003 sp2. How can i turn off the email forwarding banner >that appears in outlook 2003? > >a user is complaing that they dont want to see the note in outlook that >tells them when they forwarded on the email. > >Thanks And d...

address list won't display
When I am sending an email message and I click "To." I get the message "The Address List Could not be displayed". I click "OK" and the "Select Names" dialog box comes up. I click on the arrow at "Show Names from the:" It lists "Contacts" about 5 times. I select the last "Contacts" and then the address list comes up. Anyone know what is happening and how to fix it? Thanks, Huck Of course. Post your Outlook version and tell us the steps you used to disconnect your Outlook Address Book Service. -- Russ Valentine [MVP-Ou...

Variety of XML questions;
Hi all, sorry I couldn't be more specific on the subject. I have a few questions that affect the design of objects I am building, and was wondering if anyone had any input or experiences to relate. Apologies if any of these answers truly should be RTFM, I'm just spooling the current questions I have off of my brain and am not sure where to look for these answers. When you grab a reference to an XMLNode, will changes to the siblings or parents affect the reference? Are pointers / references to individual nodes created upon parsing, or upon demand? (Does parsing create the node instanc...

The form required to view this message cannot be displayed...
I have been using Outlook 2002 since January. About 2 months ago, I suddenly began receiving the following message when viewing attachments or individual responses on newsgroup digests sent to me: "The form required to view this message cannot be displayed. Contact your administrator." I have searched for several hours attempting to resolve this. Various suggestions are offered for other versions of Outlook, but I can't seem to find any for Outlook 2002. Clearing the forms cache and restarting outlook doesn't work. Any suggestions? Try renaming frmcache.dat ...

Outlook Web Access " The page cannot be found"
When a user trys to change password via Outlook Web Access 2003 they are getting an error " The page cannot be found" I doing have my IISADMPWD virtual directory set up. On Mon, 12 Jul 2004 11:22:02 -0700, Richard wrote: > When a user trys to change password via Outlook Web Access 2003 they are getting an error " The page cannot be found" I doing have my IISADMPWD virtual directory set up. Did you follow this MS KB? 327134 - HOW TO: Use the Change Password Feature in Outlook Web Access: http://support.microsoft.com/default.aspx?scid=kb;en-us;327134 -- Henrik W...

I'm making a 300+ page catalog can Pub handle that many ?
or so I need to break it up into sections ? If so what would be the recommended number of pages per section ? Thanks Ron, Without getting into the potential size of the file(s) which may necessitate several files rather than one large one, have you asked the printer how they want it? some like single page pdf files, others 16- or 24-page signatures, others one combined pdf file. Personally, I would never try doing a 300-page publication unless I have back-ups for every 15-20 pages. Imagine getting 290 of them done and the file becoming corrupt. Mike Ron wrote: > or so I need to b...

Querying Very Large XML
I am working on a project that will have about 500,000 records in an XML document. This document will need to be queried with XPath, and records will need to be updated. I was thinking about splitting up the XML into several XML documents (perhaps 50,000 per document) to be more efficient but this will make things a lot more complex because the searching needs to go accross all 500,000 records. Can anyone point me to some best practices / performance techniques for handling large XML documents? Obviously, the XmlDocument object is probably not a good choice... Greg, The recommended ...

xml help
hi, I have a basic xml file that I woul like people to update using exce is this possible.?? Bac -- bac ----------------------------------------------------------------------- bach's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2613 View this thread: http://www.excelforum.com/showthread.php?threadid=50619 ...

Display first 3 characters in a field
Using Access XP... Admin. in the Mrktng dept. is going to track data using marketing codes where the first 3 characters will be the marketing code and the last two the current year. For example: ABC06, ABC07, ABC08, etc. however, when the staff is going to enter the data in a form a drop down MUST show only ACD. I created a table for the marketing codes information and linked to a field, etc., etc. I have no problem with any of that. The problem is that when the staff clicks on the drop down arrow they can see ABC08 instead of only ABC. I indicated that it does not matter that staff can...

Save as web page does not work
Visio 2003 Pro on WinXP Pro. If I select "Save as web page" on the File menu, and then click "Save", the dialog closes and nothing happens. The same is true if I click on "Publish" button in the same dialog. What could be wrong? Try creating a shortcut to the Visio.exe with " /r" added, eg "C:\Program Files\Microsoft Office\Visio11\visio.exe /r" This will re-reg Visio and hopefully provide access to the SaveAsWeb features. "Jerry" <duncan_jeremy@hotmail.com> wrote in message news:ukIqBFgwFHA.2072@TK2MSFTNGP14.phx.gbl......