From b14dd79d8d44c27d34e6f95b2512d013df386470 Mon Sep 17 00:00:00 2001 From: jim teeuwen Date: Thu, 9 Feb 2012 17:30:21 +0100 Subject: [PATCH] No more Makefiles. Use go command to build and install. Temporarily removed dependency of external go-charset package. It is incompatible with new Go versions and is not updated by the author. We should find a replacement for it. This may cause problems with xml files supplied in non-utf8 encodings. --- Makefile | 10 ---------- README | 15 +-------------- document.go | 8 ++++---- 3 files changed, 5 insertions(+), 28 deletions(-) delete mode 100644 Makefile diff --git a/Makefile b/Makefile deleted file mode 100644 index 158d2e6..0000000 --- a/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -# This work is subject to the CC0 1.0 Universal (CC0 1.0) Public Domain Dedication -# license. Its contents can be found at: -# http://creativecommons.org/publicdomain/zero/1.0/ - -include $(GOROOT)/src/Make.inc - -TARG = github.com/jteeuwen/go-pkg-xmlx -GOFILES = document.go node.go entitymap.go - -include $(GOROOT)/src/Make.pkg diff --git a/README b/README index 01a3da5..b3f9b6a 100644 --- a/README +++ b/README @@ -12,20 +12,7 @@ DEPENDENCIES ================================================================================ - goinstall go-charset.googlecode.com/hg/charset - -================================================================================ - USAGE -================================================================================ - - Getting the package up and running is simple enough. This should also - automatically take care of any dependencies for you: - - $ goinstall github.com/jteeuwen/go-pkg-xmlx - - Using it: - - import xmlx "github.com/jteeuwen/go-pkg-xmlx" + none ================================================================================ API diff --git a/document.go b/document.go index 6ef83be..77d355c 100644 --- a/document.go +++ b/document.go @@ -26,7 +26,7 @@ package xmlx import ( "bytes" - "code.google.com/p/go-charset/charset" + //"code.google.com/p/go-charset/charset" "encoding/xml" "errors" "fmt" @@ -82,9 +82,9 @@ func (this *Document) SelectNodes(namespace, name string) []*Node { func (this *Document) LoadStream(r io.Reader) (err error) { xp := xml.NewDecoder(r) xp.Entity = this.Entity - xp.CharsetReader = func(enc string, input io.Reader) (io.Reader, error) { - return charset.NewReader(enc, input) - } + //xp.CharsetReader = func(enc string, input io.Reader) (io.Reader, error) { + // return charset.NewReader(enc, input) + //} this.Root = NewNode(NT_ROOT) ct := this.Root