Minor improvements in Node.Bytes() implementation. Some test case tweaking.

This commit is contained in:
jim teeuwen 2011-09-30 12:06:20 +02:00
parent 2a2a591c08
commit 4f7417ecbc
3 changed files with 18 additions and 20 deletions

View file

@ -277,7 +277,7 @@ func (this *Node) String() (s string) {
func (this *Node) printRoot() []byte {
var b bytes.Buffer
for _, v := range this.Children {
b.WriteString(v.String())
b.Write(v.Bytes())
}
return b.Bytes()
}
@ -323,7 +323,7 @@ func (this *Node) printElement() []byte {
b.WriteRune('>')
for _, v := range this.Children {
b.WriteString(v.String())
b.Write(v.Bytes())
}
b.WriteString(this.Value)