[IMC-Tech] Cities list

mark burdett mark at indymedia.org
Mon Nov 20 09:26:35 PST 2006


The parser was originally written for dada, which is a php cms.
then adopted by sf-active (also php).

http://codecoop.org/plugins/scmcvs/cvsweb.php/sf-active/sf-active/shared/classes/pages/admin_cities.inc?rev=1.15;content-type=text%2Fx-cvsweb-markup;cvsroot=sf-active

you could use xslt to tranform it into xml
http://www.xmldatabases.org/WK/blog/1086?t=item

php5 has xsl and simplexml extensions which could be useful

--mark B.

On Sun, 19 Nov 2006 23:02:17 +0000, ekes wrote:
> Hi,
> 
> Asking to get flamed here but does anyone really use the cities.xml is
> it worth the parsing?
> 
> If so is there a php parser to save me the effort... tbh I am headed for
> a preg on the html or maybe the xml as quicker (and lower overhead).
> 
> The format is plist an apple thing. A quick scan brings up no useful
> general parsers in php or perl (a standard xml parse has to load in
> layers of useless stuff, and then deal with <key> <string> at the same
> level). Reinventing the xml format is cool if it would be quicker than
> rewriting the parsing of it.
> 
> What was wrong with inventing our own xml format that any plain parser
> would see the heirachy of?
> 
> ekes
> 
> for those that haven't seen it before (like me till recently):
> 
> <plist version="1.0">
>   <dict>
>     <key>NULL</key>
>     <array>
>       <dict>
>         <key>NULL</key>	
> 	<array>
>           <dict>
>             <key>www.indymedia.org</key>
>             <string>http://www.indymedia.org/</string>
>           </dict>
>         </array>
> 
>         <key>africa</key>
> 	<array>
> 	  <dict>
>             <key>Ambazonia</key>
>             <string>http://ambazonia.indymedia.org/</string>
>             <key>Canarias</key>
>             <string>http://canarias.indymedia.org</string>
>             <key>estrecho / madiaq</key>
>             <string>http://estrecho.indymedia.org</string>
>             <key>Kenya</key>
>             <string>http://kenya.indymedia.org/</string>
>             <key>Nigeria</key>
>             <string>http://nigeria.indymedia.org/</string>
>             <key>South Africa</key>
>             <string>http://southafrica.indymedia.org/</string>
>          </dict>
>        </array>
> ....
> 



> _______________________________________________
> imc-tech mailing list
> imc-tech at lists.indymedia.org
> http://lists.indymedia.org/mailman/listinfo/imc-tech




More information about the imc-tech mailing list