XML to XML. XSLT conversion
-
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
-
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
-
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
The easiest way to transform XML to another hierarchy is to use a combination of xsl:copy and xsl:copy-of.