https://github.com/pharo-contributions/XML-XMLParser
XML Parser for Pharo
https://github.com/pharo-contributions/XML-XMLParser
Last synced: about 1 month ago
JSON representation
XML Parser for Pharo
- Host: GitHub
- URL: https://github.com/pharo-contributions/XML-XMLParser
- Owner: pharo-contributions
- License: mit
- Created: 2019-10-25T12:51:49.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-02-03T19:33:23.000Z (4 months ago)
- Last Synced: 2025-03-03T18:47:30.258Z (3 months ago)
- Language: Smalltalk
- Size: 2.92 MB
- Stars: 12
- Watchers: 8
- Forks: 18
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-pharo - XML-Parser - Official XML parser maintained by Pharo community. (Data interexchange format)
README
# XML-XMLParser
[](https://github.com/pharo-contributions/XML-XMLParser/actions/workflows/test.yml)
XML Parser for [Pharo](http://www.pharo.org)
[](https://pharo.org/download)
[](https://pharo.org/download)
[](https://pharo.org/download)
[](https://pharo.org/download)
[](https://pharo.org/download)
[](https://pharo.org/download)
[](https://pharo.org/download)## 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
```Smalltalk
Metacello new
baseline: 'XMLParser';
repository: 'github://pharo-contributions/XML-XMLParser/src';
load.
```## How to use
Use the `XMLDOMParser` to parse a URL:
```Smalltalk
(XMLDOMParser parseURL: 'https://www.w3schools.com/xml/simple.xml') inspect
```or give an XML file directly:
```Smalltalk
|xmlString|
xmlString := 'Afghanistan
Albania
Algeria
'.(XMLDOMParser parse: xmlString) document root nodes inspect
```Check [https://montyos.wordpress.com](https://montyos.wordpress.com) for more
examples and descriptions.## Screenshot

## LICENSE
[MIT License](LICENSE)
## History
This project was migrated from [http://smalltalkhub.com/#!/~PharoExtras/XMLParser](http://smalltalkhub.com/#!/~PharoExtras/XMLParser)