Skip to content

Commit

Permalink
Fixed XML root name clash from issue #20
Browse files Browse the repository at this point in the history
  • Loading branch information
gnewton committed Jun 17, 2017
1 parent aecafe8 commit e5f837f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion extractor.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ type Extractor struct {
progress bool
}

const RootName = "ChidleyRoot314159"

func (ex *Extractor) extract() error {
ex.globalTagAttributes = make(map[string]([]*FQN))
ex.globalTagAttributesMap = make(map[string]bool)
Expand All @@ -39,7 +41,7 @@ func (ex *Extractor) extract() error {
decoder := xml.NewDecoder(ex.reader)

ex.root = new(Node)
ex.root.initialize("root", "", "", nil)
ex.root.initialize(RootName, "", "", nil)

ex.hasStartElements = false

Expand Down
1 change: 0 additions & 1 deletion source.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ type Source interface {
newSource(name string) error
getName() string
getReader() io.Reader
copySource() (Source, error)
}

type GenericSource struct {
Expand Down

0 comments on commit e5f837f

Please sign in to comment.