XML to RSS

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • george veranis

    XML to RSS

    I have a big xml file (16MB approximately) and it is like that:

    <products>
    <product>
    <shopid>
    </shopid>
    <title>
    </title>
    <description>
    <description>
    <product>
    </products>

    and I want to transform it to a RSS file like that form:
    <channel>
    <title> </title>
    <description> </desription>
    <link>www.mydom ain.com/go.jsp?prod=<sh opid> <link>
    </channel>

    Please if anybody knows to tell which program language I can use to
    transform it.

    Thanks in advance!

  • Andy Dingley

    #2
    Re: XML to RSS


    george veranis wrote:[color=blue]
    > I have a big xml file (16MB approximately) and it is like that:[/color]
    [color=blue]
    > and I want to transform it to a RSS file like that form:[/color]

    [color=blue]
    > Please if anybody knows to tell which program language I can use to
    > transform it.[/color]

    Start with XSLT

    If you don't know XSLT, then you should learn it. It's a useful tool
    for any XML developer.

    It's a good choice for this class of XML transform problem.

    Now the downside. 16MB is a large XML document. XSLT probably won't run
    very quickly on it (but I doubt this is a problem).

    A 16MB RSS document would also be unusual (although possible) in RSS.
    Who is this intended for, and are they really expecting to receive so
    many items in it?

    If you're going to filter your full catalogue down into a small RSS
    channel (couple of dozen items max.), then XSLT might not be the best
    choice, compared to some database tools. XML (in general) is not an
    ideal format for "big document, small filtered set" problems.

    Comment

    • John Bailo

      #3
      Re: XML to RSS

      george veranis wrote:[color=blue]
      > I have a big xml file (16MB approximately) and it is like that:
      >
      > <products>
      > <product>
      > <shopid>
      > </shopid>
      > <title>
      > </title>
      > <description>
      > <description>
      > <product>
      > </products>
      >
      > and I want to transform it to a RSS file like that form:
      > <channel>
      > <title> </title>
      > <description> </desription>
      > <link>www.mydom ain.com/go.jsp?prod=<sh opid> <link>
      > </channel>
      >
      > Please if anybody knows to tell which program language I can use to
      > transform it.
      >
      > Thanks in advance!
      >[/color]

      RSS is just another usage of XML for describing data.

      Here is someone who wrote a VB.NET website that takes data in a database
      and transforms it to RSS.



      Note: There are multiple RSS specs (1.0, 2.0., 3.0 and variants of
      each). Different RSS Readers will respond differently to different
      spec versions.

      Comment

      Working...