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. General Programming
  3. XML / XSL
  4. XML to XML. XSLT conversion

XML to XML. XSLT conversion

Scheduled Pinned Locked Moved XML / XSL
xmlasp-netcomhelpquestion
3 Posts 3 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.
  • S Offline
    S Offline
    shapper
    wrote on last edited by
    #1

    Hello, I need to create a XML to XML conversion with XSLT. Could someone help me out with this? My original XML is: Would become: < urlset xmlns="http://www.google.com/schemas/sitemap/0.84"> < url> < loc>http://www.mydomain.com/Page01.aspx < title>Page01 So the following actions take place: 1. siteMap xmlns = "http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" becomes urlset xmlns="http://www.google.com/schemas/sitemap/0.84" Node siteMap becomes node urlset. 2. The node "siteMapNode" becomes the node "url" 3. Only the nodes where attribute "visible" is "true" are copied to the new XML file. 4. Property visible is not copied to the new file. 5. Property "url" becomes node "loc" and "~" is replaced by "http://www.mydomain.com" 6. Property name becomes node title. Well, I think I didn't forget anything. Thank You Very Much Miguel

    S G 2 Replies Last reply
    0
    • S shapper

      Hello, I need to create a XML to XML conversion with XSLT. Could someone help me out with this? My original XML is: Would become: < urlset xmlns="http://www.google.com/schemas/sitemap/0.84"> < url> < loc>http://www.mydomain.com/Page01.aspx < title>Page01 So the following actions take place: 1. siteMap xmlns = "http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" becomes urlset xmlns="http://www.google.com/schemas/sitemap/0.84" Node siteMap becomes node urlset. 2. The node "siteMapNode" becomes the node "url" 3. Only the nodes where attribute "visible" is "true" are copied to the new XML file. 4. Property visible is not copied to the new file. 5. Property "url" becomes node "loc" and "~" is replaced by "http://www.mydomain.com" 6. Property name becomes node title. Well, I think I didn't forget anything. Thank You Very Much Miguel

      S Offline
      S Offline
      safat
      wrote on last edited by
      #2

      I hope you got the idea but still what you are expecting from the people.. can you make it clear?

      :mad:
      Sathik

      1 Reply Last reply
      0
      • S shapper

        Hello, I need to create a XML to XML conversion with XSLT. Could someone help me out with this? My original XML is: Would become: < urlset xmlns="http://www.google.com/schemas/sitemap/0.84"> < url> < loc>http://www.mydomain.com/Page01.aspx < title>Page01 So the following actions take place: 1. siteMap xmlns = "http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" becomes urlset xmlns="http://www.google.com/schemas/sitemap/0.84" Node siteMap becomes node urlset. 2. The node "siteMapNode" becomes the node "url" 3. Only the nodes where attribute "visible" is "true" are copied to the new XML file. 4. Property visible is not copied to the new file. 5. Property "url" becomes node "loc" and "~" is replaced by "http://www.mydomain.com" 6. Property name becomes node title. Well, I think I didn't forget anything. Thank You Very Much Miguel

        G Offline
        G Offline
        George L Jackson
        wrote on last edited by
        #3

        The easiest way to transform XML to another hierarchy is to use a combination of xsl:copy and xsl:copy-of.

        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