473,508 Members | 2,091 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Render XML data island to HTML?

I have an XML data island in my aspx web page. The XML includes a link
(processing instruction) to an XSL stylesheet. Is there any way on this page
to view the HTML, that results from the xsl transformation, as the contents
of, say, a div? I know I can do it if I display only the XML in IE, but I
don't know if I can do it as a fragment of an existing HTML page.

TIA
Nov 12 '05 #1
4 4303
> I have an XML data island in my aspx web page. The XML includes a link
(processing instruction) to an XSL stylesheet. Is there any way on this page to view the HTML, that results from the xsl transformation, as the contents of, say, a div? I know I can do it if I display only the XML in IE, but I
don't know if I can do it as a fragment of an existing HTML page.


Yes you can. It will require some Javascript.
I don't have time to hack out a full example for you this morning as I'm off
for my Sat bike ride, but, take a look
at the example code from Chapter 7 of Glasshaus Practical XML For The Web.
http://support.apress.com/books.asp?bId=66&s=1
http://www.amazon.com/exec/obidos/AS...151086/nova-20

In this chapter I demonstrate how to write this sort of stuff in a manner
that will work across both IE and the Netscape derriviatives.

Chreers
Chris
-------------------------------------------
Kognition Consulting Limited - Thought Meets Technology
Chris J.T. Auld - Managing Director
Microsoft MVP (Windows Mobile Devices)
Phone: +64 3 453 0064
Mobile: +64 21 500 239
Email: ch***@kognition.co.nz
Nov 12 '05 #2
"Chris J.T. Auld [MVP]" <ch***@spam.me.not.nova.co.nz> wrote in message
news:OJ**************@TK2MSFTNGP10.phx.gbl...
I have an XML data island in my aspx web page. The XML includes a link
(processing instruction) to an XSL stylesheet. Is there any way on this page
to view the HTML, that results from the xsl transformation, as the

contents
of, say, a div? I know I can do it if I display only the XML in IE, but I don't know if I can do it as a fragment of an existing HTML page.


Yes you can. It will require some Javascript.
I don't have time to hack out a full example for you this morning as I'm

off for my Sat bike ride, but, take a look
at the example code from Chapter 7 of Glasshaus Practical XML For The Web.
http://support.apress.com/books.asp?bId=66&s=1
http://www.amazon.com/exec/obidos/AS...151086/nova-20

In this chapter I demonstrate how to write this sort of stuff in a manner
that will work across both IE and the Netscape derriviatives.


VERY nice!
Nov 12 '05 #3
Thanks.....
I describe it in some detail in the book, but basically I make the
NS/Mozilla DOM behave like the IE DOM by extending the object using the slot
based language features of Javascript.

Chris

--
****Please Reply To The Newsgroup So All Can Benefit From Discussion****
-------------------------------------------
Kognition Consulting Limited - Thought Meets Technology
Chris J.T. Auld - Managing Director
Microsoft MVP (Windows Mobile Devices)
Phone: +64 3 453 0064
Mobile: +64 21 500 239
Email: ch***@kognition.co.nz
"Gandalf" <ga*****@sauron.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
"Chris J.T. Auld [MVP]" <ch***@spam.me.not.nova.co.nz> wrote in message
news:OJ**************@TK2MSFTNGP10.phx.gbl...
I have an XML data island in my aspx web page. The XML includes a link
(processing instruction) to an XSL stylesheet. Is there any way on
this
page
to view the HTML, that results from the xsl transformation, as the contents
of, say, a div? I know I can do it if I display only the XML in IE,
but I don't know if I can do it as a fragment of an existing HTML page.


Yes you can. It will require some Javascript.
I don't have time to hack out a full example for you this morning as I'm

off
for my Sat bike ride, but, take a look
at the example code from Chapter 7 of Glasshaus Practical XML For The

Web. http://support.apress.com/books.asp?bId=66&s=1
http://www.amazon.com/exec/obidos/AS...151086/nova-20

In this chapter I demonstrate how to write this sort of stuff in a manner that will work across both IE and the Netscape derriviatives.


VERY nice!

Nov 12 '05 #4
Put the xml string inside a <xmp>...</xmp> structure

Brian

Nov 12 '05 #5

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

Similar topics

2
3917
by: Simon | last post by:
Hi, I am having a little problem with my PHP - MySQl code, I have two tables (shown below) and I am trying populate a template page with data from both. <disclaimer>Now I would like to say my...
5
6472
by: Tim | last post by:
I've been working on this for over a week now, and just can't get this figured out. Hoping one of you gurus can help me out here. I have an xml data island that I'm representing on an htm page as...
3
1590
by: Bishfish | last post by:
I have an XML document containing 400+ quotations, in the format: quotes qtnum title author comment quotes ...400+ more XML file size 156Kb
3
2234
by: Nicole Schenk | last post by:
I need to know the code I must write to respond xml to a data island as a result from a src request from the data island. Thanks so much
2
2670
by: Dnna | last post by:
I have a table which is bound to an Internet Explorer XML data island. I'm using ASP.NET's client-side validators for an input field in the table. The problem is that if the input fields are in...
3
3244
by: Pat Alessi | last post by:
I want to use an XML data island to display editable records to a user on the cleint side. The user should be able to scroll through the records, modify any or all fields in any or all records, add...
2
1888
by: adolf garlic | last post by:
I have an aspx which has some client side script. The client side part of the page also features an xml data island What I want to be able to do is to get at the data island from the server...
5
4204
by: Vigneshwar Pilli via DotNetMonster.com | last post by:
string connectionString1 = "server=(local); user=sa;password=sa; database=sonic"; System.Data.SqlClient.SqlConnection dbConnection1 = new System.Data.SqlClient.SqlConnection(connectionString1);...
0
7225
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
7124
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
7385
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...
1
5053
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...
0
4707
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3195
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1558
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
766
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
418
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.