Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Linux, Apache, MySQL, PHP
  4. xml to html

xml to html

Scheduled Pinned Locked Moved Linux, Apache, MySQL, PHP
htmlcomxmlquestion
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    AndyInUK
    wrote on last edited by
    #1

    Hi, Just have set of around 100 xml files that need to be displayed on HTML. Each file consists of same 40 elements and then sub elements as well. While looking for the best way to display the xml in html - i found w3s solution i.e. http://www.w3schools.com/xml/xml_to_html.asp[^] But this process is quite cumbersome. I mean, if i go with this process, I have to enter all the elelments and sub elements name and then only i can get that to display my xml in html. Is there any other way, that can read the xml file itself and display each elements and sub elements in html ?? Thanks Andyyy

    M C T 3 Replies Last reply
    0
    • A AndyInUK

      Hi, Just have set of around 100 xml files that need to be displayed on HTML. Each file consists of same 40 elements and then sub elements as well. While looking for the best way to display the xml in html - i found w3s solution i.e. http://www.w3schools.com/xml/xml_to_html.asp[^] But this process is quite cumbersome. I mean, if i go with this process, I have to enter all the elelments and sub elements name and then only i can get that to display my xml in html. Is there any other way, that can read the xml file itself and display each elements and sub elements in html ?? Thanks Andyyy

      M Offline
      M Offline
      Matt Meyer
      wrote on last edited by
      #2

      You might want to look into using XSLT for translating your XML into something HTML friendly.

      1 Reply Last reply
      0
      • A AndyInUK

        Hi, Just have set of around 100 xml files that need to be displayed on HTML. Each file consists of same 40 elements and then sub elements as well. While looking for the best way to display the xml in html - i found w3s solution i.e. http://www.w3schools.com/xml/xml_to_html.asp[^] But this process is quite cumbersome. I mean, if i go with this process, I have to enter all the elelments and sub elements name and then only i can get that to display my xml in html. Is there any other way, that can read the xml file itself and display each elements and sub elements in html ?? Thanks Andyyy

        C Offline
        C Offline
        cjoki
        wrote on last edited by
        #3

        yes, php has a new (to me) class you can read about it here. http://www.php.net/manual/en/class.domdocument.php[^] I found it very easy to use on html sources. But if you look in the comments you will see some examples of how xml to html can be done.

        Chris J www.redash.org

        1 Reply Last reply
        0
        • A AndyInUK

          Hi, Just have set of around 100 xml files that need to be displayed on HTML. Each file consists of same 40 elements and then sub elements as well. While looking for the best way to display the xml in html - i found w3s solution i.e. http://www.w3schools.com/xml/xml_to_html.asp[^] But this process is quite cumbersome. I mean, if i go with this process, I have to enter all the elelments and sub elements name and then only i can get that to display my xml in html. Is there any other way, that can read the xml file itself and display each elements and sub elements in html ?? Thanks Andyyy

          T Offline
          T Offline
          timoteui
          wrote on last edited by
          #4

          Recently had a similar challenge. You might try checking out IBM's site by searching for xml parsing techniques. My files were huge and the solution I worked out performs extremely well and quickly.

          Timoteui

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups