Tiny MinXML parser in JavaScript
03:37, 12 Apr 2000 UTC | Simon St.Laurent

Sjoerd Visscher announced a tiny parser for MinXML written in 28 lines of JavaScript.

The parser demonstration uses what doesn't look like a well-formed XML or MinXML document (too many root elements), but this behavior is reflected in the underlying code, which treats the stream as multiple documents within a single file. As the MinXML spec says in Section 3.1, "Minimal XML parsers must be able to parse multiple documents in a single stream or file."

This very simple bit of code appears to smoothly parse the test document and modifications as well, and may prove an easy way to integrate MinXML with browser-based applications.

Update: Visscher has updated this parser and renamed it JaSMin. The script is now 50 lines of code rather than 28.

| See 1 comment

Newest comments

Re: Tiny MinXML parser in JavaScript (Neil Burnett - 22:04, 12 Jan 2001)
Why does badly formed xml hang the browser? I thought a good use for parsing using input clientside ...
xmlhack: developer news from the XML community

Front page | Search | Find XML jobs

Related categories