Re: [xml-dev] XML Parsing in Go

From
Cecil New <>
To
Elliotte Rusty Harold <>
Date
2017-12-07T20:19:31Z
ID
<>
Thread
Re: [xml-dev] XML Parsing in Go
The "tagged" structs in Go are more flexible than first appearances may show, but the built-in xml parser doesn't give a lot of options. 

Over at godocs.org a search on xml show some that may be of interest. But I can't vouch for any of them:
- a pull parser https://godoc.org/github.com/mmcdole/goxpp
- a streaming parser https://godoc.org/mellium.im/xmlstream (work in progress)
- one that claims to follow the W3 standard https://godoc.org/github.com/tdewolff/parse/xml
- a "event based" parser https://godoc.org/github.com/lucsky/go-exml
- one that builds a tree of Go values https://godoc.org/aqwari.net/xml/xmltree

HTH,
Cecil


On Thu, Dec 7, 2017 at 1:59 PM Elliotte Rusty Harold <[email protected]> wrote:
I'm looking into a project that will do some XML parsing and likely be
implemented in Go. What do folks think of the available libraries? All
I see so far seems to be based on the rather broken notion of data
binding. (One more time: XML documents are not structs.)

Is there any rough equivalent to SAX, DOM, or XOM for Go that supports
XML in its full generality? For now I can live without external entity
resolution. Validation would be nice but is not absolutely essential.
I do need to support mixed content and elements that don't necessarily
appear when and where you expect them, though.

--
Elliotte Rusty Harold
[email protected]

_______________________________________________________________________

XML-DEV is a publicly archived, unmoderated list hosted by OASIS
to support XML implementation and development. To minimize
spam in the archives, you must subscribe before posting.

[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
Or unsubscribe: [email protected]
subscribe: [email protected]
List archive: http://lists.xml.org/archives/xml-dev/
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php