Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 7th, 2007, 04:37 PM
Registered User
 
Join Date: Nov 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default how to import data from html

In xslt, is there any way I can import html data from an html page?

 
Old December 7th, 2007, 07:12 PM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

If it's XHTML, you can simply read it using the document() function.

If it's not, you have to convert it to XML. One way to do that is to read it on the fly using John Cowan's TagSoup parser, which presents it to the XSLT application as if it had been XML all along. Another way is to do a static conversion using the JTidy utility. Finally, XSLT 2.0 allows you to read HTML as text (without conversion to XML) using the unparsed-text() function - but of course, as text, it's not so easy to manipulate.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference





Similar Threads
Thread Thread Starter Forum Replies Last Post
data storage and import stealthdevil Visual Basic 2005 Basics 4 September 19th, 2007 11:12 AM
import xls or html Nathalie Beginning VB 6 3 April 26th, 2006 11:48 AM
HTML Import Errors: anandham Classic ASP Basics 1 December 4th, 2005 05:26 PM
Import data in SQL Cinderella Classic ASP Basics 7 July 28th, 2004 05:06 PM
Excel Data Import bmains ASP.NET 1.x and 2.0 Application Design 4 April 14th, 2004 02:12 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.