Skip to content

This package provides a Seaside-like, block-based API for XML generation

License

Notifications You must be signed in to change notification settings

pharo-contributions/XML-XMLWriter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XML-XMLWriter

This package provides a Seaside-like, block-based API for XML generation for Pharo

Unit Tests Coverage Status

Pharo 7 Pharo 8 Pharo 9 Pharo 10 Pharo 11 Pharo 12 Pharo 13

Installation

Metacello new
	baseline: 'XMLWriter';
	repository: 'github://pharo-contributions/XML-XMLWriter/src';
	load.

Usage

A simple example on how to use the XML writer

|writer|
writer := XMLWriter new.
writer 
	enablePrettyPrinting;
	comment: 'A simple XML structure';
	tag: 'hello'
	with: [ writer tag: 'world' ].
writer asString

results in the following XML output

<!--A simple XML structure-->
<hello>
    <world/>
</hello>

Check the class XMLWriterTest for many other examples.

LICENSE

MIT License

History

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