diff -Nru golang-github-mmcdole-goxpp-0.0~git20181012.0068e33/debian/changelog golang-github-mmcdole-goxpp-0.0~git20200921.2f3784f/debian/changelog --- golang-github-mmcdole-goxpp-0.0~git20181012.0068e33/debian/changelog 2020-02-16 11:41:12.000000000 +0000 +++ golang-github-mmcdole-goxpp-0.0~git20200921.2f3784f/debian/changelog 2020-10-18 20:27:04.000000000 +0000 @@ -1,3 +1,17 @@ +golang-github-mmcdole-goxpp (0.0~git20200921.2f3784f-1) unstable; urgency=medium + + * debian/control: + - Bump debhelper-compat to 13. + - Update my uploader name. + * debian/upstream/medata: + - Add upstream metadata. + * debian/copyright: + - Update my uploader name. + * New upstream version 0.0~git20200921.2f3784f + * Drop upstreamed patch. + + -- Aloïs Micard Sun, 18 Oct 2020 22:27:04 +0200 + golang-github-mmcdole-goxpp (0.0~git20181012.0068e33-1) unstable; urgency=medium * Initial release (Closes: #951295) diff -Nru golang-github-mmcdole-goxpp-0.0~git20181012.0068e33/debian/control golang-github-mmcdole-goxpp-0.0~git20200921.2f3784f/debian/control --- golang-github-mmcdole-goxpp-0.0~git20181012.0068e33/debian/control 2020-02-16 11:41:12.000000000 +0000 +++ golang-github-mmcdole-goxpp-0.0~git20200921.2f3784f/debian/control 2020-08-17 07:48:36.000000000 +0000 @@ -1,10 +1,10 @@ Source: golang-github-mmcdole-goxpp Maintainer: Debian Go Packaging Team -Uploaders: Alois Micard +Uploaders: Aloïs Micard Section: devel Testsuite: autopkgtest-pkg-go Priority: optional -Build-Depends: debhelper-compat (= 12), +Build-Depends: debhelper-compat (= 13), dh-golang Build-Depends-Indep: golang-any, golang-github-stretchr-testify-dev diff -Nru golang-github-mmcdole-goxpp-0.0~git20181012.0068e33/debian/copyright golang-github-mmcdole-goxpp-0.0~git20200921.2f3784f/debian/copyright --- golang-github-mmcdole-goxpp-0.0~git20181012.0068e33/debian/copyright 2020-02-16 11:41:12.000000000 +0000 +++ golang-github-mmcdole-goxpp-0.0~git20200921.2f3784f/debian/copyright 2020-08-17 07:48:48.000000000 +0000 @@ -8,7 +8,7 @@ License: Expat Files: debian/* -Copyright: 2020 Alois Micard +Copyright: 2020 Aloïs Micard License: Expat Comment: Debian packaging is licensed under the same terms as upstream diff -Nru golang-github-mmcdole-goxpp-0.0~git20181012.0068e33/debian/patches/01-fix-typo-readme golang-github-mmcdole-goxpp-0.0~git20200921.2f3784f/debian/patches/01-fix-typo-readme --- golang-github-mmcdole-goxpp-0.0~git20181012.0068e33/debian/patches/01-fix-typo-readme 2020-02-16 11:41:12.000000000 +0000 +++ golang-github-mmcdole-goxpp-0.0~git20200921.2f3784f/debian/patches/01-fix-typo-readme 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -Description: Fix typo in README.md file. -Forwarded: https://github.com/mmcdole/goxpp/pull/7 -Author: Alois Micard -Reviewed-by: Alois Micard -Last-Update: 2020-02-25 ---- a/README.md -+++ b/README.md -@@ -3,7 +3,7 @@ - [![Build Status](https://travis-ci.org/mmcdole/goxpp.svg?branch=master)](https://travis-ci.org/mmcdole/goxpp) [![Coverage Status](https://coveralls.io/repos/github/mmcdole/goxpp/badge.svg?branch=master)](https://coveralls.io/github/mmcdole/goxpp?branch=master) [![License](http://img.shields.io/:license-mit-blue.svg)](http://doge.mit-license.org) - [![GoDoc](https://godoc.org/github.com/mmcdole/goxpp?status.svg)](https://godoc.org/github.com/mmcdole/goxpp) - --The `goxpp` library is an XML parser library that is loosely based on the [Java XMLPullParser](http://www.xmlpull.org/v1/download/unpacked/doc/quick_intro.html). This library allows you to easily parse arbitary XML content using a pull parser. You can think of `goxpp` as a lightweight wrapper around Go's XML `Decoder` that provides a set of functions that make it easier to parse XML content than using the raw decoder itself. -+The `goxpp` library is an XML parser library that is loosely based on the [Java XMLPullParser](http://www.xmlpull.org/v1/download/unpacked/doc/quick_intro.html). This library allows you to easily parse arbitrary XML content using a pull parser. You can think of `goxpp` as a lightweight wrapper around Go's XML `Decoder` that provides a set of functions that make it easier to parse XML content than using the raw decoder itself. - - This project is licensed under the [MIT License](https://raw.githubusercontent.com/mmcdole/goxpp/master/LICENSE) - diff -Nru golang-github-mmcdole-goxpp-0.0~git20181012.0068e33/debian/patches/series golang-github-mmcdole-goxpp-0.0~git20200921.2f3784f/debian/patches/series --- golang-github-mmcdole-goxpp-0.0~git20181012.0068e33/debian/patches/series 2020-02-16 11:41:12.000000000 +0000 +++ golang-github-mmcdole-goxpp-0.0~git20200921.2f3784f/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -01-fix-typo-readme diff -Nru golang-github-mmcdole-goxpp-0.0~git20181012.0068e33/debian/upstream/metadata golang-github-mmcdole-goxpp-0.0~git20200921.2f3784f/debian/upstream/metadata --- golang-github-mmcdole-goxpp-0.0~git20181012.0068e33/debian/upstream/metadata 1970-01-01 00:00:00.000000000 +0000 +++ golang-github-mmcdole-goxpp-0.0~git20200921.2f3784f/debian/upstream/metadata 2020-08-17 07:29:05.000000000 +0000 @@ -0,0 +1,5 @@ +Homepage: https://github.com/mmcdole/goxpp +Repository: https://github.com/mmcdole/goxpp.git +Repository-Browse: https://github.com/mmcdole/goxpp +Bug-Database: https://github.com/mmcdole/goxpp/issues +Bug-Submit: https://github.com/mmcdole/goxpp/issues/new diff -Nru golang-github-mmcdole-goxpp-0.0~git20181012.0068e33/README.md golang-github-mmcdole-goxpp-0.0~git20200921.2f3784f/README.md --- golang-github-mmcdole-goxpp-0.0~git20181012.0068e33/README.md 2020-02-16 11:38:24.000000000 +0000 +++ golang-github-mmcdole-goxpp-0.0~git20200921.2f3784f/README.md 2020-09-21 14:55:34.000000000 +0000 @@ -3,7 +3,42 @@ [![Build Status](https://travis-ci.org/mmcdole/goxpp.svg?branch=master)](https://travis-ci.org/mmcdole/goxpp) [![Coverage Status](https://coveralls.io/repos/github/mmcdole/goxpp/badge.svg?branch=master)](https://coveralls.io/github/mmcdole/goxpp?branch=master) [![License](http://img.shields.io/:license-mit-blue.svg)](http://doge.mit-license.org) [![GoDoc](https://godoc.org/github.com/mmcdole/goxpp?status.svg)](https://godoc.org/github.com/mmcdole/goxpp) -The `goxpp` library is an XML parser library that is loosely based on the [Java XMLPullParser](http://www.xmlpull.org/v1/download/unpacked/doc/quick_intro.html). This library allows you to easily parse arbitary XML content using a pull parser. You can think of `goxpp` as a lightweight wrapper around Go's XML `Decoder` that provides a set of functions that make it easier to parse XML content than using the raw decoder itself. +The `goxpp` library is an XML parser library that is loosely based on the [Java XMLPullParser](http://www.xmlpull.org/v1/download/unpacked/doc/quick_intro.html). This library allows you to easily parse arbitrary XML content using a pull parser. You can think of `goxpp` as a lightweight wrapper around Go's XML `Decoder` that provides a set of functions that make it easier to parse XML content than using the raw decoder itself. + +## Overview + +To begin parsing a XML document using `goxpp` you must pass it an `io.Reader` object for your document: + +```go +file, err := os.Open("path/file.xml") +parser := xpp.NewXMLPullParser(file, false, charset.NewReader) +``` + +The `goxpp` library decodes documents into a series of token objects: + +| Token Name | +|----------------------------------| +| StartDocument | +| EndDocument | +| StartTag | +| EndTag | +| Text | +| Comment | +| ProcessingInstruction | +| Directive | +| IgnorableWhitespace | + +You will always start at the `StartDocument` token and can use the following functions to walk through a document: + +| Function Name | Description | +|----------------------------------|---------------------------------------| +| Next() | Advance to the next `Text`, `StartTag`, `EndTag`, `EndDocument` token.
Note: skips `Comment`, `Directive` and `ProcessingInstruction` | +| NextToken() | Advance to the next token regardless of type. | +| NextText() | Advance to the next `Text` token. | +| Skip() | Skip the next token. | +| DecodeElement(v interface{}) | Decode an entire element from the current tag into a struct.
Note: must be at a `StartTag` token | + + This project is licensed under the [MIT License](https://raw.githubusercontent.com/mmcdole/goxpp/master/LICENSE)