Simple XML Creator

Tagged:  •  


This is an extremely simple XML creator to create simple XML files quickly. The usage is like this:

html := XMLNode new: 'html'.

body := html add: (XMLNode new: 'body').
body at: 'bgcolor' put: '#ff0000'.

h1 := body add: (XMLNode new: 'h1').
h1 value: 'My Heading'.

p := body add: (XMLNode new: 'p').
p value: 'My paragraph'.

html fileOut: '/home/myhome/sample.xml'.

Which creates an XML file with the following content:

        <body bgcolor="#ff0000">
                <h1>My Heading</h1>
                <p>My paragraph</p>

You can download the package via:

gst-package --download SimpleXMLCreator -t ~/.st

or from: (Non-GNU Smalltalkers can open the star package with their archive manager to look at the code, it is just a zip file)

Our Maxwell Park mens uniform blazers are 100% polyester, fully lined with inside pockets, Single breasted notch with top stitching and patch pockets. Machine Washable, water repellent finish, wrinkle resistant. Available in sizes 34-64 in short, regular, long and extra long. They are perfec
Augusta Green Blazers

Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic.Royal Blue Blazers

User login