SunQuest
           XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old July 2nd, 2003, 11:41 AM
mrusaw's Avatar
mrusaw mrusaw is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Dallas, Texas
Posts: 138 mrusaw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via AIM to mrusaw Send a message via Yahoo to mrusaw
Question Output HTML to File from XML/XSL

My question is:

We have an .asp application that has initializes xml and xsl to output content in html for browsing on the internet. Everything is working properly with the output in "real time" when a browser causes the xml/xsl to be parsed. Do you know of a solution that would actually save a copy of the resulting html pages this giving a "copy" for redistribution?

Thanks again in advance for your help!

mr...

Reply With Quote
  #2  
Old July 2nd, 2003, 12:53 PM
bricker42 bricker42 is offline
Moderator =(8^(|)
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2002
Location: Sacramento, CA
Posts: 1,710 bricker42 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 38 sec
Reputation Power: 8
Send a message via AIM to bricker42
Are you wanting to automate this? The easiest way is to hit the page, go to view source, and save the result.

If you've got images, just use your browser to save the page, and it will save the html w/ images.

If you're wanting to automate the procedure, there are standalone xsl transformers that you can run from a commandline, but those will only work if you don't have any logic in your .asp that you need to duplicate.

You can also use something like wget from the command line to grab the .asp output (+ any images if you want) and save the output to a file.
__________________
-james

Reply With Quote
  #3  
Old July 2nd, 2003, 01:19 PM
mrusaw's Avatar
mrusaw mrusaw is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Dallas, Texas
Posts: 138 mrusaw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via AIM to mrusaw Send a message via Yahoo to mrusaw
It is using asp and msxml. Thanks to both of you.

bricker42 - It is a multipage website (actually a course in real life) that i need to render as html with the links and all working. Then I could copy and paste the images and files into a folder and send out the course.

Reply With Quote
  #4  
Old July 2nd, 2003, 01:51 PM
bricker42 bricker42 is offline
Moderator =(8^(|)
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2002
Location: Sacramento, CA
Posts: 1,710 bricker42 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 38 sec
Reputation Power: 8
Send a message via AIM to bricker42
Use wget. http://www.gnu.org/software/wget/wget.html (There are links to windows versions from there).

Your command line would look something like:
wget -r -k -p http://your/asp/file

what the options do:
-r : recursive web suck, so it will get the whole site
-k : convert absolute links to relative, so that all the links work
-p : get all page requisites (images, etc)

If your html pages are getting downloaded with .asp extensions, you can use the -E option to make all text/html pages have a .html extension.

This will give you a directory structure that you can zip up and move whereever.

Reply With Quote
  #5  
Old July 2nd, 2003, 01:52 PM
mrusaw's Avatar
mrusaw mrusaw is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Dallas, Texas
Posts: 138 mrusaw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via AIM to mrusaw Send a message via Yahoo to mrusaw
Sweet! I will take a look ASAP!

mr...

Reply With Quote
  #6  
Old July 2nd, 2003, 01:57 PM
mrusaw's Avatar
mrusaw mrusaw is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Dallas, Texas
Posts: 138 mrusaw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via AIM to mrusaw Send a message via Yahoo to mrusaw
bricker - have you ever passed any parameters to the http://your/asp/file.asp?field1=value&field2=value

The site requires a few parameters to initialy render the html properly.

Reply With Quote
  #7  
Old July 2nd, 2003, 02:58 PM
bricker42 bricker42 is offline
Moderator =(8^(|)
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2002
Location: Sacramento, CA
Posts: 1,710 bricker42 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 38 sec
Reputation Power: 8
Send a message via AIM to bricker42
That should work fine. I don't think you can send form parameters (and if your site requires form interaction or javascript, wget isn't going to get everything), but you can send parameters through the query string just fine.

Reply With Quote
  #8  
Old July 3rd, 2003, 07:59 AM
mrusaw's Avatar
mrusaw mrusaw is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Dallas, Texas
Posts: 138 mrusaw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via AIM to mrusaw Send a message via Yahoo to mrusaw
I am having a heck of a time finding and instaling a windows version of the wget. I seem to find what says is a Win32 version but the installation instructions and files all are for UNIX. I hate to bother you but could you help me out here?

Reply With Quote
  #9  
Old July 3rd, 2003, 12:10 PM
bricker42 bricker42 is offline
Moderator =(8^(|)
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2002
Location: Sacramento, CA
Posts: 1,710 bricker42 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 38 sec
Reputation Power: 8
Send a message via AIM to bricker42
Well, here's the url for where I got mine.

http://www.weihenstephan.de/~syring/win32/UnxUtils.html

It's not just wget, though. It's a whole bunch of common unix utilties for windows. They're really useful, though .

Reply With Quote
  #10  
Old July 3rd, 2003, 02:34 PM
mrusaw's Avatar
mrusaw mrusaw is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Dallas, Texas
Posts: 138 mrusaw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via AIM to mrusaw Send a message via Yahoo to mrusaw
Great I got it and it seems to be connecting but I don't know how to give it a download folder.

Reply With Quote
  #11  
Old July 3rd, 2003, 02:42 PM
mrusaw's Avatar
mrusaw mrusaw is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Dallas, Texas
Posts: 138 mrusaw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via AIM to mrusaw Send a message via Yahoo to mrusaw
scratch that i figured out how to get the directory path but it says permission denied. I will have to keep looking about the permission denied message.

Reply With Quote
  #12  
Old July 3rd, 2003, 06:23 PM
bricker42 bricker42 is offline
Moderator =(8^(|)
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2002
Location: Sacramento, CA
Posts: 1,710 bricker42 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 38 sec
Reputation Power: 8
Send a message via AIM to bricker42
By default it should download to wherever you run the executable from.

Also, for the "permission denied" message: is it telling you it doesn't have permission to access the website, or that it doesn't have permission to write files to disk?

Reply With Quote
  #13  
Old July 7th, 2003, 08:26 AM
mrusaw's Avatar
mrusaw mrusaw is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Dallas, Texas
Posts: 138 mrusaw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via AIM to mrusaw Send a message via Yahoo to mrusaw
good question. It doesn't define which is having the problem. But it is the last step and it does appear to seccuessfully read the website. That leads me to belive it can't write to the directory i chose which happens to be on my loocal C:\ and I am an adminsitator.

Reply With Quote
  #14  
Old July 7th, 2003, 11:33 AM
bricker42 bricker42 is offline
Moderator =(8^(|)
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2002
Location: Sacramento, CA
Posts: 1,710 bricker42 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 38 sec
Reputation Power: 8
Send a message via AIM to bricker42
Well, the only thing I can think of is to make sure the directory you're trying to write to isn't write protected. I haven't come across anything like this before.

Reply With Quote
  #15  
Old July 7th, 2003, 11:40 AM
mrusaw's Avatar
mrusaw mrusaw is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Dallas, Texas
Posts: 138 mrusaw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via AIM to mrusaw Send a message via Yahoo to mrusaw
thanks man I will keep looking.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > Output HTML to File from XML/XSL


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump