Convert XML file

Discussion in 'XML' started by shapper, Oct 8, 2006.

  1. shapper

    shapper Guest

    Hello,

    I am trying to convert an Asp.Net 2.0 XML sitemap file to a Google's
    sitemap file.

    I am posting the formats of both files.

    How can I do this?

    Thank You,
    Miguel

    GOOGLE SiteMap

    <?xml version="1.0" encoding="UTF-8"?>
    < urlset xmlns="http://www.google.com/schemas/sitemap/0.84">
    < url>
    < loc>http://www.mydomain.com/example.aspx</loc>
    < lastmod>2005-01-01</lastmod>
    < changefreq>daily</changefreq>
    < priority>0.8</priority>
    </url>
    </urlset>

    ASP.NET 2.0 Site Map

    <?xml version="1.0" encoding="utf-8" ?>
    <siteMap
    xmlns = "http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
    <siteMapNode>
    <siteMapNode
    url = "~/example.aspx"
    changefreq = "daily"
    lastmod = "2005-01-01"
    description = "My example page and its contents"
    priority = "0.8"
    title = "Example page" />
    </siteMapNode>
    </siteMap>

    Note: description and title should be droped when converting from
    Asp.Net to Google sitemap.
     
    shapper, Oct 8, 2006
    #1
    1. Advertising

  2. >How can I do this?

    Write an XSLT stylesheet. Or write a DOM-based program. Or write a
    SAX-based program. It appears to be straightforward to code in any of
    these approaches.


    --
    () ASCII Ribbon Campaign | Joe Kesselman
    /\ Stamp out HTML e-mail! | System architexture and kinetic poetry
     
    Joe Kesselman, Oct 8, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ben Turner
    Replies:
    2
    Views:
    9,314
    Ken Cox [Microsoft MVP]
    Jan 2, 2004
  2. Tom Denford
    Replies:
    0
    Views:
    698
    Tom Denford
    Apr 22, 2005
  3. jkflens
    Replies:
    2
    Views:
    1,548
    jkflens
    May 30, 2006
  4. mahesh
    Replies:
    2
    Views:
    1,261
    Real Gagnon
    Feb 17, 2007
  5. Erik Wasser
    Replies:
    5
    Views:
    532
    Peter J. Holzer
    Mar 5, 2006
Loading...

Share This Page