[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: NITF XML feeds
As it turns out I am finding it on more sites than expected using
NITF instead of RSS. It seems NZ Herald, AFP and several others so
far I found using NITF.
>'If NITF XML is actually XML'.
The file below is one headline and shows XML 1.0. They tell me it is
NITF 2.5 XML. Each headline is an xml file.
I was hoping there was some script out there already written. XSLT
and xlstproc are all new to me.
<?xml version="1.0"?>
<!DOCTYPE nitf SYSTEM "http://syndication.whi.co.nz/dtd/nitf-2-
5.dtd">
<nitf>
<head>
<title>New Zealand Herald Stories</title>
<tobject>
<tobject.subject tobject.subject.refnum="3549979"
tobject.subject.type="sport" tobject.subject.matter="rugby"
tobject.subject.detail="super12"/>
</tobject>
</head>
<body>
<body.head>
<hedline>
<hl1>Super 12 draw, results and points table -
2004</hl1>
</hedline>
<dateline>
<story.date>Apr 25 2004 4:59AM</story.date>
</dateline>
</body.head>
<body.content>
<block>
<media media-type="other">
<media-reference data-location=""
copyright="%26copy%3BCopyright%202004%2C%09%3Ca%20href%3D%27http%3A%
2F%2Fwww%2Enzherald%2Eco%2Enz%27%3EThe%20New%20Zealand%20Herald%3C%
2Fa%3E" mime-type="text"/>
</media>
<media media-type="data">
<media-reference data-location="http%3A%2F%
2Fwww%2Enzherald%2Eco%2Enz%2Fsports%2Fsportsstorydisplay%2Ecfm%
3FstoryID%3D3549979%26thesection%3Dsport%26thesubsection%3Drugby%
26thesecondsubsection%3Dsuper12" mime-type="text"/>
</media>
<p>Story copy disallowed</p>
</block>
</body.content>
</body>
</nitf>
--- In syndication@yahoogroups.com, Rick Bradley <roundeye@r...>
wrote:
> * mikerocks65 (kynast@i...) [040425 15:14]:
> > I have one site that has NITF XML feeds rather than RSS feeds.
> >
> > Anyone have a simple NITF to HTML converter they recommend for
use on
> > a Linux box?
> >
> > I currently use the RSS to html converter at webreference below
which
> > is quite simple but does the job. I am looking for something
just as
> > simple for NITF.
>
> If NITF XML is actually XML (I'm not familiar with that format) then
> writing an XSLT sheet and running libxml's xlstproc
>
> % xlstproc sheet.xsl nitfdata.xml > mydata.html
>
> should do the trick. You should similarly be able to do the
transform
> within nearly any modern programming language using the preferred
XSLT
> library.
>
> Rick
> --
> http://www.rickbradley.com MUPRN: 637
> | back in a month
> random email haiku | (aug 11th) for the same thing as
> | a follow-up.