284 lines
14 KiB
HTML
284 lines
14 KiB
HTML
<!DOCTYPE html>
|
|
<!--
|
|
| Generated by Apache Maven Doxia at 2016-04-24
|
|
| Rendered using Apache Maven Fluido Skin 1.3.0
|
|
-->
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<meta name="author" content="kwebble" />
|
|
<meta name="Date-Creation-yyyymmdd" content="20110923" />
|
|
<meta name="Date-Revision-yyyymmdd" content="20160424" />
|
|
<meta http-equiv="Content-Language" content="en" />
|
|
<title>ROME - Home</title>
|
|
<link rel="stylesheet" href="../css/apache-maven-fluido-1.3.0.min.css" />
|
|
<link rel="stylesheet" href="../css/site.css" />
|
|
<link rel="stylesheet" href="../css/print.css" media="print" />
|
|
|
|
|
|
<script type="text/javascript" src="../js/apache-maven-fluido-1.3.0.min.js"></script>
|
|
|
|
|
|
</head>
|
|
<body class="topBarDisabled">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a href="http://github.com/rometools/rome">
|
|
<img style="position: absolute; top: 0; right: 0; border: 0; z-index: 10000;"
|
|
src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"
|
|
alt="Fork me on GitHub">
|
|
</a>
|
|
|
|
|
|
|
|
|
|
<div class="container-fluid">
|
|
<div id="banner">
|
|
<div class="pull-left">
|
|
<a href="../index.html" id="bannerLeft">
|
|
<img src="../images/romelogo.png" alt="ROME"/>
|
|
</a>
|
|
</div>
|
|
<div class="pull-right"> </div>
|
|
<div class="clear"><hr/></div>
|
|
</div>
|
|
|
|
<div id="breadcrumbs">
|
|
<ul class="breadcrumb">
|
|
|
|
|
|
|
|
|
|
|
|
<li id="publishDate" class="pull-right">Last Published: 2016-04-24</li> <li class="divider pull-right">|</li>
|
|
<li id="projectVersion" class="pull-right">Version: 1.7.0-SNAPSHOT</li>
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
<div class="row-fluid">
|
|
<div id="leftColumn" class="span3">
|
|
<div class="well sidebar-nav">
|
|
|
|
|
|
<ul class="nav nav-list">
|
|
<li class="nav-header">Rome</li>
|
|
|
|
<li>
|
|
|
|
<a href="../index.html" title="Overview">
|
|
<i class="none"></i>
|
|
Overview</a>
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<a href="../HowRomeWorks/index.html" title="How Rome Works">
|
|
<i class="icon-chevron-right"></i>
|
|
How Rome Works</a>
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<a href="../RssAndAtOMUtilitiEsROMEV0.5AndAboveTutorialsAndArticles/index.html" title="Tutorials And Articles">
|
|
<i class="none"></i>
|
|
Tutorials And Articles</a>
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<a href="../ROMEReleases/index.html" title="Releases">
|
|
<i class="icon-chevron-right"></i>
|
|
Releases</a>
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<a href="../ROMEDevelopmentProposals/index.html" title="ROME Development Proposals">
|
|
<i class="none"></i>
|
|
ROME Development Proposals</a>
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<a href="../Modules/index.html" title="Modules">
|
|
<i class="icon-chevron-right"></i>
|
|
Modules</a>
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<a href="../Fetcher/index.html" title="Fetcher">
|
|
<i class="icon-chevron-right"></i>
|
|
Fetcher</a>
|
|
</li>
|
|
|
|
<li class="active">
|
|
|
|
<a href="#"><i class="none"></i>OPML</a>
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<a href="../Propono/index.html" title="Propono">
|
|
<i class="none"></i>
|
|
Propono</a>
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<a href="../Certiorem/index.html" title="Certiorem">
|
|
<i class="icon-chevron-right"></i>
|
|
Certiorem</a>
|
|
</li>
|
|
<li class="nav-header">Project Documentation</li>
|
|
|
|
<li>
|
|
|
|
<a href="../project-info.html" title="Project Information">
|
|
<i class="icon-chevron-right"></i>
|
|
Project Information</a>
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
<hr class="divider" />
|
|
|
|
<div id="poweredBy">
|
|
<div class="clear"></div>
|
|
<div class="clear"></div>
|
|
<div class="clear"></div>
|
|
<a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
|
|
<img class="builtBy" alt="Built by Maven" src="../images/logos/maven-feather.png" />
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div id="bodyColumn" class="span9" >
|
|
|
|
<div class="section">
|
|
<h2>ROME OPML<a name="ROME_OPML"></a></h2>
|
|
<p>This project provides support for <a class="externalLink" href="http://www.opml.org/">OPML</a> in ROME.</p>
|
|
<div class="section">
|
|
<h3>Downloads<a name="Downloads"></a></h3>
|
|
<ul>
|
|
<li><a href="./apidocs/index.html">JavaDocs</a></li></ul></div>
|
|
<div class="section">
|
|
<h3>Sample Usage<a name="Sample_Usage"></a></h3>
|
|
<p>To use this parser, simply include the jar file in your classpath as you are using ROME. Be sure it exists at the same level as ROME, such that, if ROME is in the common classpath of an application server, don't include this jar in your webapps WEB-INF/lib.</p>
|
|
<div class="source">
|
|
<pre>WireFeedInput input = new WireFeedInput();
|
|
Opml feed = (Opml) input.build( new File("myOpml.xml") );
|
|
List<Outline> outlines = (List<Outline>) feed.getOutlines();</pre></div></div>
|
|
<div class="section">
|
|
<h3>Hierarchy vs Flat<a name="Hierarchy_vs_Flat"></a></h3>
|
|
<p>Since OPML is a hierarchical format, some magic is required to preserve this information when they feed is moved to a Synd* structure. This is accomplished by adding categories indicating the tree structure to the <a class="externalLink" href="http://wiki.java.net/bin/edit/Javawsxml/SyndEntries?topicparent=Javawsxml.OPML;nowysiwyg=0">SyndEntries</a> ...</p>
|
|
<p>For example:</p>
|
|
<div class="source">
|
|
<pre><opml version="1.0">
|
|
<head>
|
|
<title>Top Ten Sources for podcasting</title>
|
|
<ownerName>Newsilike Media Group</ownerName>
|
|
<ownerEmail>opml@TopTenSources.com</ownerEmail>
|
|
</head>
|
|
<body>
|
|
<outline type="link" text="TopTenSources: podcasting"
|
|
url="http://podcasting.TopTenSources.com/TopTenSources/" />
|
|
<outline text="CBS Technology News Podcast - Larry Magid' Tech Report">
|
|
<outline type="link" text="Larry Magid's Tech Report" url="http://www.cbsnews.com" />
|
|
</outline>
|
|
<outline text="Adam Curry: Daily Source Code">
|
|
<outline type="link" text="#374 Daily Source Code for Tuesday April 25th 2006"
|
|
url="http://radio.weblogs.com/0001014/2006/04/26.html#a7304" />
|
|
<outline type="link" text="#373 Daily Source Code for Monday April 24th 2006"
|
|
url="http://radio.weblogs.com/0001014/2006/04/24.html#a7303" />
|
|
<outline type="link" text="#372 Daily Source Code for Friday April 21st 2006"
|
|
url="http://radio.weblogs.com/0001014/2006/04/21.html#a7302" />
|
|
<outline type="link" text="#371 Daily Source Code for Thursday April 20th 2006"
|
|
url="http://radio.weblogs.com/0001014/2006/04/20.html#a7301" />
|
|
<outline type="link" text="#370 Daily Source Code for Wednesday April 19th 2006"
|
|
url="http://radio.weblogs.com/0001014/2006/04/19.html#a7300" />
|
|
</outline>
|
|
<outline text="Gillmor Gang">
|
|
<outline type="link" text="Syndicate Gang Part I" url="http://gillmorgang.podshow.com/?p=44" />
|
|
<outline type="link" text="HughTrain Gang" url="http://gillmorgang.podshow.com/?p=43" />
|
|
<outline type="link" text="Phlegm at 11 Gang" url="http://gillmorgang.podshow.com/?p=42" />
|
|
<outline type="link" text="NDA Gang" url="http://gillmorgang.podshow.com/?p=41" />
|
|
<outline type="link" text="When the Music?s Over Gang" url="http://gillmorgang.podshow.com/?p=40" />
|
|
</outline></pre></div>
|
|
<p>...<br />When converted to RSS2 becomes:</p>
|
|
<div class="source">
|
|
<pre><channel>
|
|
<title>Top Ten Sources for podcasting</title>
|
|
<link>http://foo.com</link>
|
|
<description />
|
|
<managingEditor>Newsilike Media Group</managingEditor>
|
|
<item>
|
|
<title>TopTenSources: podcasting</title>
|
|
<link>http://podcasting.TopTenSources.com/TopTenSources/</link>
|
|
<category domain="urn:rome.tree">node.-1732517202</category>
|
|
<category domain="urn:rome.attribute#url">http://podcasting.TopTenSources.com/TopTenSources/</category>
|
|
<guid>http://podcasting.TopTenSources.com/TopTenSources/</guid>
|
|
</item>
|
|
<item>
|
|
<title>CBS Technology News Podcast - Larry Magid' Tech Report</title>
|
|
<category domain="urn:rome.tree">node.1353657827</category>
|
|
</item>
|
|
<item>
|
|
<title>Larry Magid's Tech Report</title>
|
|
<link>http://www.cbsnews.com</link>
|
|
<category domain="urn:rome.tree">node.-4085850</category>
|
|
<category domain="urn:rome.tree">parent.1353657827</category>
|
|
<category domain="urn:rome.attribute#url">http://www.cbsnews.com</category>
|
|
<guid>http://www.cbsnews.com</guid>
|
|
</item>
|
|
<item>
|
|
<title>Adam Curry: Daily Source Code</title>
|
|
<category domain="urn:rome.tree">node.835791399</category>
|
|
</item>
|
|
<item>
|
|
<title>#374 Daily Source Code for Tuesday April 25th 2006</title>
|
|
<link>http://radio.weblogs.com/0001014/2006/04/26.html#a7304</link>
|
|
<category domain="urn:rome.tree">node.222050897</category>
|
|
<category domain="urn:rome.tree">parent.835791399</category>
|
|
<category domain="urn:rome.attribute#url">http://radio.weblogs.com/0001014/2006/04/26.html#a7304</category>
|
|
<guid>http://radio.weblogs.com/0001014/2006/04/26.html#a7304</guid>
|
|
</item>
|
|
<item>
|
|
<title>#373 Daily Source Code for Monday April 24th 2006</title>
|
|
<link>http://radio.weblogs.com/0001014/2006/04/24.html#a7303</link>
|
|
<category domain="urn:rome.tree">node.2088220478</category>
|
|
<category domain="urn:rome.tree">parent.835791399</category>
|
|
<category domain="urn:rome.attribute#url">http://radio.weblogs.com/0001014/2006/04/24.html#a7303</category>
|
|
<guid>http://radio.weblogs.com/0001014/2006/04/24.html#a7303</guid>
|
|
</item></pre></div>
|
|
<p>Nodes get categories with the "urn:rome.tree" URI that is used to maintain the tree structure.</p>
|
|
<p>The other thing you will notice is the "urn:rome.attribute#url". Since OPML allows you to add arbitrary attributes to each outline element, these are used to preserve these values.</p></div></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<hr/>
|
|
|
|
<footer>
|
|
<div class="container-fluid">
|
|
<div class="row span12">Copyright © 2016.
|
|
All Rights Reserved.
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
</footer>
|
|
</body>
|
|
</html>
|