[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XML Parsing in Go

  • From: Cecil New <cecil.new@gmail.com>
  • To: Elliotte Rusty Harold <elharo@ibiblio.org>
  • Date: Thu, 07 Dec 2017 20:28:13 +0000

Re:  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 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
- 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@i...> 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]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.