Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > HTML to XML call

Reply
Thread Tools

HTML to XML call

 
 
joeraymond@gmail.com
Guest
Posts: n/a
 
      05-02-2007
Hi,

I am trying to figure out if it would be possible to write an app that
could visit certain website, obtain the relevant data from those pages
and convert it into a readable XML file.

All I would like to know is how would I go about starting this task,
and any advice comments anyone has on it.

Regards


Joe

 
Reply With Quote
 
 
 
 
Joseph Kesselman
Guest
Posts: n/a
 
      05-02-2007
The W3C's "tidy" tool can rewrite (potentially broken) HTML into XHTML,
which is an XML-based dialect of HTML.

There are also HTML parsers available whose output is the standard W3C
APIs such as SAX and DOM, and thus compatable with XML tooling. NekoHTML
is one such, leveraging the Apache Xerces parser framework.


--
Joe Kesselman / Beware the fury of a patient man. -- John Dryden
 
Reply With Quote
 
 
 
 
Pavel Lepin
Guest
Posts: n/a
 
      05-03-2007
http://www.velocityreviews.com/forums/(E-Mail Removed) <(E-Mail Removed)> wrote in
<(E-Mail Removed) .com>:
> I am trying to figure out if it would be possible to write
> an app that could visit certain website, obtain the
> relevant data from those pages and convert it into a
> readable XML file.


What's the problem? Retrieve the document using your http
library of choice, parse it using your HTML parser of
choice, feed the DOM document to your XSLT processor of
choice, serialize the resulting DOM document (using, well,
your serializer of choice). Better yet, stuff the resulting
DOM document into your XML database of choice. Heck, make
it RDF/XML, stuff it into some SPARQL-aware storage and
venture capitalists will be swarming all over you. I would,
if I had a few million bucks I didn't need. Providing
third-party semantics for all the meatbag-parsable content
on the web will be quite an industry some ten years from
now I think.

Okay, scratch that, I'm just daydreaming. But the basic
process for your task would be what I described indeed (the
real heart of it would be an XSLT transformation that would
suck the relevant data out of your source document,
naturally).

> All I would like to know is how would I go about starting
> this task, and any advice comments anyone has on it.


My professional opinion is that if you don't even know where
to start, you're not really up for it. I hope you don't
need it for anything serious--but it certainly would make
an excellent exercise in many modestly exciting areas.

--
Pavel Lepin
 
Reply With Quote
 
Andy Dingley
Guest
Posts: n/a
 
      05-03-2007
On 2 May, 15:52, (E-Mail Removed) wrote:

> I am trying to figure out if it would be possible to write an app that
> could visit certain website, obtain the relevant data from those pages
> and convert it into a readable XML file.


It's a staggeringly hard problem to solve. The tricky bit is that
word "relevant".

Otherwise it's trivial.

 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Call a javascript when i call an aspx page with a form html not running on server Fabio Mastria ASP .Net 4 01-28-2008 09:05 AM
XML call XSL that calls xml through document() element hagar Java 1 10-19-2006 09:56 PM
Different results parsing a XML file with XML::Simple (XML::Sax vs. XML::Parser) Erik Wasser Perl Misc 5 03-05-2006 10:09 PM
HTML in XML call? Fergus O'Shea XML 4 11-26-2003 12:58 PM
HTML to XML (to call a web service) Monorom XML 0 07-29-2003 09:42 PM



Advertisments