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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Convert XML file to an ASPX page

Convert XML file to an ASPX page

Scheduled Pinned Locked Moved ASP.NET
xmlhtmldatabase
5 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.
  • K Offline
    K Offline
    Krishnaraj Barvathaya B
    wrote on last edited by
    #1

    Hi I have an xml file stored in database. This XML files defines asp/html controls, its size, layout etc. Sample XML file is given below: <Label Field="Label1" Top="22" Left="24" Height="31" Width="485" Align="Left" Caption="Title Text"> <Font Name="Garamond" Size="27" Color="FFFFFF"/> </Label> <Image Field="Image1" Top="0" Left="0" Height="80" Width="735" File="Image1.jpg"/> <Label Field="Label2" Top="25" Left="18" Height="29" Width="493" Align="Left" Caption="Sub Title"> <Font Name="Garamond" Size="24" Color="FFFFFF"/> </Label> Is there any way without XSLT I can tranform this XML file into an ASPX/html page during run time. Thank you,

    Krishnaraj Barvathaya B

    A M 2 Replies Last reply
    0
    • K Krishnaraj Barvathaya B

      Hi I have an xml file stored in database. This XML files defines asp/html controls, its size, layout etc. Sample XML file is given below: <Label Field="Label1" Top="22" Left="24" Height="31" Width="485" Align="Left" Caption="Title Text"> <Font Name="Garamond" Size="27" Color="FFFFFF"/> </Label> <Image Field="Image1" Top="0" Left="0" Height="80" Width="735" File="Image1.jpg"/> <Label Field="Label2" Top="25" Left="18" Height="29" Width="493" Align="Left" Caption="Sub Title"> <Font Name="Garamond" Size="24" Color="FFFFFF"/> </Label> Is there any way without XSLT I can tranform this XML file into an ASPX/html page during run time. Thank you,

      Krishnaraj Barvathaya B

      A Offline
      A Offline
      Abhijit Jana
      wrote on last edited by
      #2

      will it store in each single node ?

      cheers, Abhijit Check My Latest Article

      1 Reply Last reply
      0
      • K Krishnaraj Barvathaya B

        Hi I have an xml file stored in database. This XML files defines asp/html controls, its size, layout etc. Sample XML file is given below: <Label Field="Label1" Top="22" Left="24" Height="31" Width="485" Align="Left" Caption="Title Text"> <Font Name="Garamond" Size="27" Color="FFFFFF"/> </Label> <Image Field="Image1" Top="0" Left="0" Height="80" Width="735" File="Image1.jpg"/> <Label Field="Label2" Top="25" Left="18" Height="29" Width="493" Align="Left" Caption="Sub Title"> <Font Name="Garamond" Size="24" Color="FFFFFF"/> </Label> Is there any way without XSLT I can tranform this XML file into an ASPX/html page during run time. Thank you,

        Krishnaraj Barvathaya B

        M Offline
        M Offline
        Manas Bhardwaj
        wrote on last edited by
        #3

        Krishnaraj Barvathaya B wrote:

        Is there any way without XSLT I can tranform this XML file into an ASPX/html page during run time.

        Not a nice idea though, but you can parse this xml and create control at runtime.

        Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.

        K 1 Reply Last reply
        0
        • M Manas Bhardwaj

          Krishnaraj Barvathaya B wrote:

          Is there any way without XSLT I can tranform this XML file into an ASPX/html page during run time.

          Not a nice idea though, but you can parse this xml and create control at runtime.

          Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.

          K Offline
          K Offline
          Krishnaraj Barvathaya B
          wrote on last edited by
          #4

          Thank you for your comments. Now I think it won’t be possible to convert to html from xml without defining a XSLT. Can anybody tell me the best way to write an xslt for the above code segment? All the controls have been defined in the xml in the same order it must appear in the web page.

          Krishnaraj Barvathaya B

          C 1 Reply Last reply
          0
          • K Krishnaraj Barvathaya B

            Thank you for your comments. Now I think it won’t be possible to convert to html from xml without defining a XSLT. Can anybody tell me the best way to write an xslt for the above code segment? All the controls have been defined in the xml in the same order it must appear in the web page.

            Krishnaraj Barvathaya B

            C Offline
            C Offline
            Christian Graus
            wrote on last edited by
            #5

            Converting to HTML is a canonical example, any XSLT book or website will show examples. \

            Christian Graus No longer a Microsoft MVP, but still happy to answer your questions.

            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