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.
This commit is contained in:
parent
6e76dc96aa
commit
b14dd79d8d
3 changed files with 5 additions and 28 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue