473,405 Members | 2,262 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,405 software developers and data experts.

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...
Nov 11 '05 #1
2 8166
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/de...ml04212000.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.*********@leeds.ac.uk> wrote in message
news:84**************************@posting.google.c om...
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...

Nov 11 '05 #2
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.*********@leeds.ac.uk> wrote in message
news:84**************************@posting.google.c om...
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...

Nov 11 '05 #3

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

Similar topics

0
by: Wynter | last post by:
RE: from Displaying a Document using the ASPNET user account to the Client Browser discussion (3/2/2004 Buddy Thanks for helping me on getting the document to display. But now I am left with a...
2
by: Carole MacDonald | last post by:
There have been lots of posts on this topic, but I haven't been able to apply any of the suggestions to my situation. I have an .aspx page with a form on it that has several submit buttons on...
0
by: Fronky | last post by:
Hope someone can help. I am still learning, so no laughing please. I am displaying records from a database using Response.Write(""); instead of the usual datagrid method. I am doing it this way...
3
by: vinayak | last post by:
Hi I am displaying data in Datagrid in ASP.NET with Edit/Update functionality for each row. On the same page I have 2 Button controls which submits the request to server. These button controls...
0
by: Coco | last post by:
Hi! I have been searching for solution for the problem i am facing in displaying chinese character in my aspx page initially when i created the aspx page with some chinese chaarcter, it worked...
2
by: mazdotnet | last post by:
Hi, I have the following code in the code-behind file public string section; section = Request.ToString() and I like to display it in my .aspx page (included .ascx) but it's not working.
15
by: Kevin Hanken | last post by:
Hi, Pretty much a newbie to aspnet and xp -- I am using XP Pro, Service Pack 2. I installed IIS, set up a virtual directory, created an aspx file and pasted in a little code from the w3schools...
11
by: pardesiya | last post by:
Friends, I am having trouble displaying Japanese text within a textbox (or anywhere else) in an aspx page with .net 2.0 framework. Initial default text in Japanese displays perfectly but when I...
7
by: hsegoy1979 | last post by:
Dear All Iam using file upload control and i want to display image in another pop up page .But image is not displaying in image control iam sending image path thru querystring . here is my code ...
7
by: RichB | last post by:
I am trying to get to grips with the asp.net ajaxcontrol toolkit, and am trying to add a tabbed control to the page. I have no problems within the aspx file, and can dynamically manipulate a...
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:
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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.