lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Jan 23, 2014, at 6:52 PM, Coda Highland <> wrote:

> Text data is just another XML node. If you have
> <a1>t1<a2>t2</a2>t3</a1> then there are two text nodes: t1, t2, and
> t3. The children of a1 are, in order, t1, a2, and t3; a2 has one
> child, t2.

You might like xml2 [1]:

$ ./xml2 <<\EOF


Another example, using Lua’s RSS feed:

$ curl -s | ./xml2 | head

/rss/channel/title=Lua: news
/rss/channel/description=What's happening in the Lua world.
/rss/channel/lastBuildDate=Tue, 28 Jan 2014 22:44:57 -0200
/rss/channel/pubDate=Tue, 28 Jan 2014 22:44:57 -0200