-
Notifications
You must be signed in to change notification settings - Fork 0
Exploring_XML
Gathering of existing material ...
https://wiki.squeak.org/squeak/2256 4744YAXO – Duane Maxwell, Andres Valloud, Michael Rueger – 25 January 2002 YAX is yet another XML parser. This version is an effort to further integrate the original yax version with the Exobox implementation. The original yax version already was based on some ideas in the Comanche tokenizer and the Exobox parser. The YAX homepage is at http://www.squeaklet.com/Yax/index.html. This change set includes a XMLParser with SAX and DOM support and a XMLWriter.
https://wiki.squeak.org/squeak/6338
https://wiki.squeak.org/squeak/6433
Lift out examples from Erudite https://github.com/Cuis-Smalltalk/Erudite
https://raw.githubusercontent.com/Cuis-Smalltalk/Erudite/refs/heads/master/Examples/xmlbook3.xml Add the statement which reads this here
https://wiki.squeak.org/squeak/6342
(XMLDOMParser parseFileNamed: 'fao_country_names.xml')
firstNode
allElementsSelect: [ : each |
each localName = 'geographical_region' ].
The file fao_country_names.xml seems to be no longer available in XML, see https://data.apps.fao.org/catalog/dataset/country-names
Find another candidate.
https://github.com/pharo-contributions/XML-XMLParser
|xmlString|
xmlString := '<?xml version="1.0" encoding="UTF-8"?>
<countries>
<country code="af" handle="afghanistan" continent="asia" iso="4">Afghanistan</country>
<country code="al" handle="albania" continent="europe" iso="8">Albania</country>
<country code="dz" handle="algeria" continent="africa" iso="12">Algeria</country>
</countries>'.
(XMLDOMParser parse: xmlString) document root nodes inspect
Does not work, needs to be adapted.
13 year old Pharo video https://www.youtube.com/watch?v=6q78hzawfGU