Usage example
This small program reads an XML file representing an RSS feed, adds an item and creates a new XML file.
Example XML (Rss.xml):
    <rss version="2.0">
      <channel>
        <title>Liftoff News</title>
        <link> http://liftoff.msfc.nasa.gov/</link>
        <description>Liftoff to Space Exploration.</description>
        <language>en-us</language>
        <pubDate>Tue, 10 Jun 2003 04:00:00 GMT</pubDate>
        <lastBuildDate>Tue, 10 Jun 2003 09:41:01 GMT</lastBuildDate>
        <docs> http://blogs.law.harvard.edu/tech/rss</docs>
        <generator>Weblog Editor 2.0</generator>
        <managingEditor>editor@example.com</managingEditor>
        <webMaster>webmaster@example.com</webMaster>
 
        <item>
          <title>Star City</title>
          <link> http://liftoff.msfc.nasa.gov/news/2003/news-starcity.asp </link>
          <description>How do Americans get ready to work with Russians aboard the
            International Space Station? They take a crash course in culture, language
            and protocol at Russia's Star City.</description>
          <pubDate>Tue, 03 Jun 2003 09:39:21 GMT</pubDate>
          <guid> http://liftoff.msfc.nasa.gov/2003/06/03.html#item573</guid>
        </item>
 
        <item>
          <title>Space Exploration</title>
          <link> http://liftoff.msfc.nasa.gov/</link>
          <description>Sky watchers in Europe, Asia, and parts of Alaska and Canada
            will experience a partial eclipse of the Sun on Saturday, May 31st.</description>
          <pubDate>Fri, 30 May 2003 11:06:42 GMT</pubDate>
          <guid> http://liftoff.msfc.nasa.gov/2003/05/30.html#item572</guid>
        </item>
 
        <item>
          <title>The Engine That Does More</title>
          <link> http://liftoff.msfc.nasa.gov/news/2003/news-VASIMR.asp </link>
          <description>Before man travels to Mars, NASA hopes to design new engines
            that will let us fly through the Solar System more quickly.  The proposed
            VASIMR engine would do that.</description>
          <pubDate>Tue, 27 May 2003 08:37:32 GMT</pubDate>
          <guid> http://liftoff.msfc.nasa.gov/2003/05/27.html#item571</guid>
        </item>
 
        <item>
          <title>Astronauts' Dirty Laundry</title>
          <link> http://liftoff.msfc.nasa.gov/news/2003/news-laundry.asp </link>
          <description>Compared to earlier spacecraft, the International Space
            Station has many luxuries, but laundry facilities are not one of them.
            Instead, astronauts have other options.</description>
          <pubDate>Tue, 20 May 2003 08:56:02 GMT</pubDate>
          <guid> http://liftoff.msfc.nasa.gov/2003/05/20.html#item570</guid>
        </item>
      </channel>
    </rss>
Copybook generated by STREAM2WRK (RSS.wrk):
            >>SOURCE FORMAT FREE
    *> XML File: RSS.xml
    01 rss identified by "rss".
       03 attr-version identified by "version" is attribute pic x any length.
       03 channel identified by "channel".
          05 title identified by "title" .
             07 title-data pic x any length.
          05 link identified by "link".
             07 link-data pic x any length.
          05 description identified by "description".
             07 description-data pic x any length.
          05 language identified by "language" .
             07 language-data pic x any length.
          05 pubDate identified by "pubDate" .
             07 pubDate-data pic x any length.
          05 lastBuildDate identified by "lastBuildDate" .
             07 lastBuildDate-data pic x any length.
          05 docs identified by "docs" .
             07 docs-data pic x any length.
          05 generator identified by "generator".
             07 generator-data pic x any length.
          05 managingEditor identified by "managingEditor".
             07 managingEditor-data pic x any length.
          05 webMaster identified by "webMaster".
             07 webMaster-data pic x any length.
          05 item identified by "item" occurs dynamic capacity item-count.
             07 title identified by "title" .
                09 title-data pic x any length.
             07 link identified by "link" .
                09 link-data pic x any length.
             07 description identified by "description" .
                09 description-data pic x any length.
             07 pubDate identified by "pubDate" .
                09 pubDate-data pic x any length.
             07 guid identified by "guid" .
                09 guid-data pic x any length.
            >>SOURCE FORMAT PREVIOUS
Example application:
    program-id. ReadWriteRSS.
    configuration section.
    repository
        class xmlStream  as "com.iscobol.rts.XMLStream"
        .
 
    working-storage section.
    77  objXmlStream object reference xmlStream.
 
    copy "RSS.wrk".
 
    procedure division.
    main.
 
        set objXmlStream to xmlStream:>new(rss).
 
        objXmlStream:>read ("RSS.xml").
 
        display message box "RSS.xml contains " item-count " items.".
 
        add 1 to item-count.
        move "New title" to title-data of item(item-count).
        move "New link" to link-data of item(item-count).
        move "New description" to description-data of item(item-count).
        move "New pubDate" to pubDate-data of item(item-count).
        move "New guid" to guid-data of item(item-count).
 
        objXmlStream:>write ("RSS-New.xml").
 
        initialize rss.
 
        objXmlStream:>read ("RSS-New.xml").
 
        display message box "RSS-New.xml contains " item-count " items.".
 
        goback.