XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] XML Parsing in Go

Should also add that I have only used the built-in parser once and it did a serviceable job. I used it to help a team understand the contents of some large XML files which had no DTD or XSD. Pretty printed they came to about 10K lines. I essentially computed counts of the elements, certain values of some attributes, etc.

While at one point, I had to ask a question on one of the Go forums (or was it Stack Overflow??), I encountered little trouble and it did everything I needed.

Cheers,
Cecil 

On Thu, Dec 7, 2017 at 3:19 PM Cecil New <cecil.new@gmail.com> wrote:
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 <elharo@ibiblio.org> 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
elharo@ibiblio.org

_______________________________________________________________________

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: xml-dev-unsubscribe@lists.xml.org
subscribe: xml-dev-subscribe@lists.xml.org
List archive: http://lists.xml.org/archives/xml-dev/
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS