Skip to content

Commit

Permalink
M: minor bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pgundlach committed Oct 15, 2024
1 parent 113dab7 commit d4a5063
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xmldecoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ func (elt Element) Stringvalue() string {
func (elt *Element) Append(n XMLNode) {
switch t := n.(type) {
case Attribute:
for _, attr := range elt.attributes {
for i, attr := range elt.attributes {
if attr.Name.Local == t.Name && attr.Name.Space == t.Namespace {
attr.Value = t.Value
elt.attributes[i].Value = t.Value
return
}
}
Expand Down Expand Up @@ -183,7 +183,7 @@ func (elt Element) Attributes() []*Attribute {
return attribs
}

func (elt Element) setParent(n XMLNode) {
func (elt *Element) setParent(n XMLNode) {
elt.Parent = n
}

Expand Down

0 comments on commit d4a5063

Please sign in to comment.