SiteExperts.com Logo Home | Community | Developer's Paradise
User Groups | Site Tools | Site Information | Search
 Main Menu
 Forums
SiteExperts.com Forums
All Discussions

SiteExperts Feedback
The Lounge
Dynamic HTML
Site Design/ Critiques
HTML and CSS
XML Technologies
The Wireless Internet
Internet Explorer
Microsoft .NET
The Server
Technical Support

Sponsored Links

User Groups : Forums : SiteExperts : The Server :

Previous DiscussionNext Discussion
 html dom on the server

Sometimes it would be nice to be able to access the same html dom that javascript "sees" - except on the server side. The problem is compounded by the fact that the server is usually jigging the pages with SSI and other processing before sending them out to the client, so just reading through the files themselves often isn't the same as how client side script might read the file. A solution on the server is to use a xmlhttp object to talk to itself so that it re-reads the served page. A page also might not be valid html or be able to be loaded as an xmldocument - but still client side dom methods seem to get over that and at least let you access the dom tree. I read somewhere that php has a module that gives you a client-side like dom on the server. Are there any for aspx / asp / iis?

Started By frumbert on Apr 11, 2006 at 4:02:43 PM

7 Response(s) | Reply

Earlier Replies | Replies 1 to 7 of 7 | Later Replies
Goto Page: 1
amikael66 on Apr 12, 2006 at 2:01:25 AM (# 1)

Thats what xin does for asp/asp.net.
http://www.naltabyte.se/howto.htm


frumbert on Apr 19, 2006 at 12:23:00 AM (# 2)

no, actually it's not. Say I take an HTML file I made 10 years ago with badly nested markup, tags that are no longer supported, and so on. I don't want to load it on the client at all, ever, I want to load it internally on the server and parse it as if it were running on the client.

Ok can't be done.


bod1467 on Apr 19, 2006 at 1:27:07 AM (# 3)

Looks like you might have to write your own custom script to analyse files versus the W3C standards. Is there a W3C database that can be accessed (via script or XML) that would define the valid tags per a given doctype? That might give the starting point for you to create such a utility.

And if you did create such a utility, and it was proven to be robust, you may even find a market to sell it. :-)


MHenke on Apr 19, 2006 at 1:47:51 AM (# 4)

SSJS?


frumbert on Apr 19, 2006 at 3:43:13 PM (# 5)

nah. In asp, jscript can be used to build the resulting page, but there isn't a "html dom" to the page as such (if it was valid xhtml then it could be loaded into an xml object though, but unfortunately that isn't the case for the documents I needed this for).

I'll revise my "can't be done" and append "easily or cheaply".


BachusII on Apr 19, 2006 at 10:50:05 PM (# 6)

There is an IE ActiveX isn't there? One which you can control from within your asp.


MHenke on Apr 20, 2006 at 1:05:36 AM (# 7)
This message has been edited.

A search for ASP HTML parser shows some interesting hits, e.g. MIL (a "non-well-formed HTML parser for .NET").
Given that I don't got your requirement wrong, frumbert, that seems to be something in the right direction.


Earlier Replies | Replies 1 to 7 of 7 | Later Replies
Goto Page: 1

To respond to a discussion, you must first logon.

If you are not registered, please register yourself to become a member of the SiteExperts.community.

User Name
Password
Copyright 1997-2004 InsideDHTML.com, LLC. All rights reserved.