Results 1 to 5 of 5
  1. #1
    nijil is offline Member
    Join Date
    Feb 2010
    Posts
    14
    Rep Power
    0

    Default convert a webpage to xml from a given url using JDOM...

    i want to convert a html(html and xhtml) page to xml page......please provide a sample program with jdom

    i would also like to know hw to acces text and uls from xml tree

    thanx in advance

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,945
    Rep Power
    19

    Default

    Unless it's badly formatted html then it is already xml.

  3. #3
    nijil is offline Member
    Join Date
    Feb 2010
    Posts
    14
    Rep Power
    0

    Default

    so does that mean u dontneed to convert it to xml for using all those funtions that come with jdom

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,945
    Rep Power
    19

    Default

    Try it out.

    You may hit some problems in that (X)HTML is a bit more forgiving than your normal XML, but you may avoid having to do some extra parsing, so just give it a go with whatever data you're likely to be using.

  5. #5
    nijil is offline Member
    Join Date
    Feb 2010
    Posts
    14
    Rep Power
    0

    Default xhtml problem

    i am getting exeption(503) and (403).....i searched and got entity resolver as the soln....i got the jar file also from google codes....but i dont know hw to use it....can any one provide a sample prog to get and parse and print an xhtml page from an url

    jar file link: java-xhtml-cache-dtds-entityresolver - Project Hosting on Google Code

Similar Threads

  1. Add a Swing UI in a WebPage
    By ivvgangadhar in forum AWT / Swing
    Replies: 9
    Last Post: 06-30-2009, 08:16 AM
  2. XML JDOM XPATH NumberFormatException
    By Jazzperson in forum Advanced Java
    Replies: 3
    Last Post: 03-08-2009, 08:15 PM
  3. save a webpage.....?
    By 05bit044 in forum Networking
    Replies: 1
    Last Post: 08-04-2008, 04:49 PM
  4. print webpage through applet
    By shakti singh in forum Java Applets
    Replies: 1
    Last Post: 07-22-2008, 07:17 PM
  5. JDOM in java applications
    By boy22 in forum Advanced Java
    Replies: 1
    Last Post: 08-02-2007, 05:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •