xml

Simple XML Creator

Tagged:  •  

Hello,

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:

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

You can download the package via:

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

or from:

XML: <!-- Weirdly --> Extensible Markup Language

Tagged:  •  

I was looking at XML these days. It is really interesting language. It is very useful and I like it a lot and I used it in some of my projects to save data but as I learn how I can extend it or use the not well known features, it confuses me.

For example, you can create entities, which are like variables in other languages. You can define/declare entities like this:

<!ENTITY client "Canol">

Syndicate content

User login