Skip to content

GsDevKit/XML-XMLParser

 
 

Repository files navigation

XML-XMLParser

Build Status

Port of XML Parser for Pharo to GemStone.

Description

XMLParser provides validating SAX and DOM parsers for well-formed XML documents. It also provides a DOM API for manipulating documents, namespace support, and an optional XMLWriter for writing documents. Validation and namespace checking are enabled by default, but not resolution of external entities.

Implements:

http://www.w3.org/TR/REC-xml/

http://www.w3.org/TR/REC-xml-names/

http://www.w3.org/TR/xml-id/

http://www.w3.org/TR/xmlbase/

Installation

Metacello

Metacello new
	baseline: 'XMLParser';
	repository: 'github://GsDevKit/XML-XMLParser:gemstone/filetree';
	load.

tODE command line

project install --url=http://gsdevkit.github.io/GsDevKit_home/XMLParser.ston
project load XMLParser

How to use

Use the XMLDOMParser to parse a URL:

(XMLDOMParser parseURL: 'https://www.w3schools.com/xml/simple.xml') inspect

or give an XML file directly:

|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 inspect 

Check https://montyos.wordpress.com for more examples and descriptions.

Screenshot

alt text

LICENSE

MIT License

History

This project was migrated from http://smalltalkhub.com/#!/~PharoExtras/XMLParser

About

XML Parser for Pharo - GemStone port

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Smalltalk 100.0%