Html to xml

Hi ,

This is prashanth

<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' ' http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd' [

]> Red Fort

  • Chatta
    Chowk

    (Covered Bazaar) – True to the name, this is a covered bazaar between
    the
    gate and the fort itself, now filled with souvenir hawkers.
  • Diwan-i-Am (Hall of Public Audience) – This building separates the outer court from the inner court, and has a marble platform for the emperor's throne.
  • Hayat Baksh Bagh (Life-Bestowing Gardens) – Once a grand garden of full of fountains and streams, now sadly all dry — only dry channels and acres of green grass remain.
  • Diwan-i-Khas (Hall of Private Audience) – Built completely of marble, this is where the emperor received special visitors.
  • Khas Mahal (Private Palace) – The Emperor's main residence. The octagonal Mussaman Burj tower looks out toward the Yamuna River, and is where the Emperor used to appear before the public for each morning.
  • Rang Mahal (Colour Palace) – The residence of the Sultan's main wife.
  • Mumtaz Mahal (Jewel Palace) – Contained six apartments for the Sultan's harem. Now used as a museum of court textiles, carpets, weapons, etc (free).
  • Daawat Khana. A minor palace at the northmost end of the Fort, this was originally the residence of a prince, but it was converted into a tea house by the British, a function it continues today. Basic meals go for around 60 rupees, drinks 10-20 rupees, and it also has the cleanest toilets around.
  • Swatantra Sangrama Sangrahalaya (Museum of the Independence Movement) – To the left after the Chatta Chowk, this is a reasonably well-presented museum on the history of independence activism in India, starting from the Mutiny of 1857 all the way to Gandhi.
  • I got an html format by hpricot and its search method

    i wanna covert to xml format i mean i able to got inner_text between
    span
    that is in case Red Fort

    Red Fort got and taken in temp variable as t1 and between Chatta
    Chowk
    taken as t2 and between

  • as t3

    So i pulling text from html so i wanna convert to xml format

    the format is

    Red FortChatta Chowk
    Chatta Chowk (Covered Bazaar) – True to the name, this is
    a
    covered bazaar between the gate and the fort itself, now filled with
    souvenir hawkers.



    like i have to do this kind of structure i ,So can you help me to
    convert

    Regards

    Prashant

    On Thu, Sep 3, 2009 at 4:54 AM, prashanth
    hiremath[email protected] wrote:

    like i have to do this kind of structure i ,So can you help me to convert

    So what have you tried so far, and how isn’t it giving you the result
    you’re looking for?


    Hassan S. ------------------------ [email protected]
    twitter: @hassan

    Thank u for reply

    K i will send you the code ,and also the input and output i am getting
    .I
    will send how the output like

    INPUT is

    Red Fort

  • Chatta Chowk (Covered Bazaar) – True to the name, this is a covered bazaar between the gate and the fort itself, now filled with souvenir hawkers.
  • Diwan-i-Am (Hall of Public Audience) – This building separates the outer court from the inner court, and has a marble platform for the emperor's throne.
  • Agrsa
  • very Beautiful A minor palace at the northmost end of the Fort, this was originally the residence of a prince, but it was converted into a tea house by the British, a function it continues today. Basic meals go for around 60 rupees, drinks 10-20 rupees, and it also has the cleanest toilets around.
  • Diwan-i-Am (Hall of Public Audience) – This building separates the outer court from the inner court, and has a marble platform for the emperor's throne.
  • So s I able to pull the text from the html inform of array but i dont
    know
    how to put the text to currespoding elements

    Red Fort
    Chatta Chowk
    (Covered Bazaar) – True to the name, this is a covered
    bazaar
    between the gate and the fort itself, now filled with souvenir hawkers.


    i have to continue for all i mean for next text also So that I am not
    getting to do through loop

    so can u help me

    Regards
    Prashant

    On Thu, Sep 3, 2009 at 5:35 PM, Hassan S.
    <[email protected]

    On Thu, Sep 3, 2009 at 5:26 AM, prashanth
    hiremath[email protected] wrote:

    Personally, I’d probably do something like this with XSLT, but…

    Aside from that, this example looks very strange – do you really
    intend that LandMarkName be a child of LandMarkType, and so
    on?

    Red Fort
    Chatta Chowk
    (Covered Bazaar) – True to the name, this is a covered bazaar
    between the gate and the fort itself, now filled with souvenir hawkers.


    I would think you would want e.g.

    Red Fort
    Chatta Chowk

    Frankly, your example doesn’t make sense – an xpath query on
    LandMarkName is going to return the Description tags and value
    as well, which seems an odd use case :slight_smile:

    FWIW,

    Hassan S. ------------------------ [email protected]
    twitter: @hassan

    K i will try and if any problem i will ask u

    On Thu, Sep 3, 2009 at 6:14 PM, Hassan S.
    <[email protected]