When trying to do this:
<cfset myXML = XmlParse("
http://www.bbc.co.uk/travelnews/tpeg/en/local/rtm/rtm_tpeg.xml",true,"http://www.bbc.co.uk/travelnew...
I got this error:
Recursive entity reference "%tpegMLDataTypes". (Reference
path: %tpegMLDataTypes -> %tpegMLDataTypes ->
%tpegMLDataTypes)
So CF doesn't like this at all. To simplify the DTD, I pulled
it all down and put it into one file (replacing the ENTITY lines
that pull in the other files with the file contents themselves).
An example is I changed this:
<ENTITY % tpegMLDataTypes PUBLIC "-//EBU//DTD tpegML data
types//EN" "tpegMLDataTypes.dtd">
&tpegMLDataTypes;
to this
<!-- ENTITY % tpegMLDataTypes PUBLIC "-//EBU//DTD tpegML
data types//EN" "tpegMLDataTypes.dtd" -->
<!--============================================================-->
<!-- tpegML TPEG Traffic and Travel Information Common
Data Types DTD release version -->
<!-- PUBLIC "-//EBU//DTD tpegML data types//EN" -->
<!--============================================================-->
<!-- time: Time in UTC, should be in the format of
"YYYY-MM-DDThh:mm:ssZ". -->
<!ENTITY % time "CDATA">
<!-- intunti: Integer Unsigned Tiny, range 0..255 -->
<!ENTITY % intunti "CDATA">
<!-- intsiti: Integer Signed Tiny, range -128..127 -->
<!ENTITY % intsiti "CDATA">
<!-- intunli: Integer Unsigned Little, range 0..65535
-->
<!ENTITY % intunli "CDATA">
<!-- intsili: Integer Signed Little, range -32768..32767
-->
<!ENTITY % intsili "CDATA">
<!-- intunlo: Integer Unsigned Long, range 0..4294967295
-->
<!ENTITY % intunlo "CDATA">
<!-- intsilo: Integer Signed Long, range
-2146483648..2147483647 -->
<!ENTITY % intsilo "CDATA">
<!-- numag: Integer from 0 to 3000000 (limited subset of
these numbers as defined in TPEG Part 2 - SSF -->
<!ENTITY % numag "CDATA">
<!-- short_string: String of up to 255 characters. -->
<!ENTITY % short_string "CDATA">
<!-- long_string: String of up to 65535 characters. -->
<!ENTITY % long_string "CDATA">
<!-- day_mask:Can select one or more days of the week to
indicate repetition.
if (selector = 00000000) : no day selected
if (selector = 0xxxxxx1) : every Sunday
if (selector = 0xxxxx1x) : every Monday
if (selector = 0xxxx1xx) : every Tuesday
if (selector = 0xxx1xxx) : every Wednesday
if (selector = 0xx1xxxx) : every Thursday
if (selector = 0x1xxxxx) : every Friday
if (selector = 01xxxxxx) : every Saturday
-->
<!ENTITY % day_mask "CDATA">
You can get that file here:
http://www.hubbach.com/tpegML.dtd
I will delete this file at some point, so don't write your
code to use my file. Pull it down onto your system and use it
locally. You might have to update this file if the BBC ever changes
their DTD or entities.
Once you do that, this will work:
<cfset myXML = XmlParse("
http://www.bbc.co.uk/travelnews/tpeg/en/local/rtm/rtm_tpeg.xml",true,"http://www.myserver.com/tpegML...
Note that it takes quite awhile. My guess is that CF uses a
DOM parser versus a SAX parser. If you wanted to speed this up, you
could probably use a Java SAX XML parser.