SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Parsing HTML to SQL using SQLDOM


Parsing HTML to SQL using SQLDOM

Author
Message
David Rueter
David Rueter
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1114 Visits: 574
Comments posted to this topic are about the item Parsing HTML to SQL using SQLDOM
davoscollective
davoscollective
Hall of Fame
Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)

Group: General Forum Members
Points: 3081 Visits: 1008
Very useful tools, thanks for sharing!
phil 26982
phil 26982
Valued Member
Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)

Group: General Forum Members
Points: 53 Visits: 59
Very nice thanks for sharing those tools with us!
I have had to do somethinng similar in the past but was fortunate enough to be using an html source that was well formatted xml, so the xml type was just what I needed. This looks very useful for 'other' flavours of html document.
Jerrry Brenner
Jerrry Brenner
Valued Member
Valued Member (67 reputation)Valued Member (67 reputation)Valued Member (67 reputation)Valued Member (67 reputation)Valued Member (67 reputation)Valued Member (67 reputation)Valued Member (67 reputation)Valued Member (67 reputation)

Group: General Forum Members
Points: 67 Visits: 109
I gave a talk at SQL Saturday 109 about how we have functionality in our application that captures the top 400 SQL statements by total elapsed time, including the showplan xml, and builds a zip file of interlinked html pages and returns the zip file to the user through the browser. For each showplan xml string, we build a DOM and run some xPath expressions across the DOM, to pull out useful information and to build a tabular representation of the query plan, showing useful information that's dependent on the type of RelOp node. (I'm repeating the talk for the SQL PASS Virtual Performance Chapter on 5/24. I got the idea of using a tabular display for the query plans from blog posts by Pinal Dave and Michael Coles. They used xQuery imbedded in SQL, but doing it in the app server is much more efficient, especially given the # of plans that I am capturing and the conditional evaluation of xPath expressions. (Show the build and probe tables for a hash match, sort columns, etc.)

It seems like your code could be used to do some (or all) of that, with the ability to conditionally run xPath expressions against the showplan xml being very useful for anyone that wanted to do a detailed analysis of an arbitrary query plan.
Phil Morris-454316
Phil Morris-454316
SSC-Enthusiastic
SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)

Group: General Forum Members
Points: 150 Visits: 36
That's really neat Jerry. SSIS log tables would be another similar need for something good like that. I've done it with the BI tools before, but a SQL-HTML setup for this would be even better. I had a play with SQL-XML-XSLT-HTML with this also and that also seemed a neat approach.
chris.rogers00
chris.rogers00
SSC-Addicted
SSC-Addicted (468 reputation)SSC-Addicted (468 reputation)SSC-Addicted (468 reputation)SSC-Addicted (468 reputation)SSC-Addicted (468 reputation)SSC-Addicted (468 reputation)SSC-Addicted (468 reputation)SSC-Addicted (468 reputation)

Group: General Forum Members
Points: 468 Visits: 187
Very useful tool, thank you, but I don't know why you felt the need to include a whole text document about "God" in the project files. I'm not sure what your god has to do with SQL Server. Thank you though
Dave Vroman
Dave Vroman
SSC-Addicted
SSC-Addicted (471 reputation)SSC-Addicted (471 reputation)SSC-Addicted (471 reputation)SSC-Addicted (471 reputation)SSC-Addicted (471 reputation)SSC-Addicted (471 reputation)SSC-Addicted (471 reputation)SSC-Addicted (471 reputation)

Group: General Forum Members
Points: 471 Visits: 727
Very nice. I'm curious if the SQLDOM is using HTML5.
In that case the <BR>
would become <br />. Any of the tags that do not have a closing tag, such as line break and image must be in the form <tag />.
dmfd
dmfd
SSC Journeyman
SSC Journeyman (82 reputation)SSC Journeyman (82 reputation)SSC Journeyman (82 reputation)SSC Journeyman (82 reputation)SSC Journeyman (82 reputation)SSC Journeyman (82 reputation)SSC Journeyman (82 reputation)SSC Journeyman (82 reputation)

Group: General Forum Members
Points: 82 Visits: 49
David, thank you for this. I have a pet project that will require me to screen scrape a few sites. This will definitely come in handy.
mohdasalah
mohdasalah
Valued Member
Valued Member (59 reputation)Valued Member (59 reputation)Valued Member (59 reputation)Valued Member (59 reputation)Valued Member (59 reputation)Valued Member (59 reputation)Valued Member (59 reputation)Valued Member (59 reputation)

Group: General Forum Members
Points: 59 Visits: 23
Thank you it's very usefull but how about its performance, did you do any stress test?
EKD
EKD
SSC-Enthusiastic
SSC-Enthusiastic (192 reputation)SSC-Enthusiastic (192 reputation)SSC-Enthusiastic (192 reputation)SSC-Enthusiastic (192 reputation)SSC-Enthusiastic (192 reputation)SSC-Enthusiastic (192 reputation)SSC-Enthusiastic (192 reputation)SSC-Enthusiastic (192 reputation)

Group: General Forum Members
Points: 192 Visits: 126
The text file in the project looks good.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum







































































































































































SQLServerCentral


Search