Adds optional indented output for the Node.String() and Node.Bytes()
methods. Set the global `IndentPrefix` var to a tab or spaces to enable indented output. The existing API has not been changed. This addresses issue #7.
This commit is contained in:
parent
88d4341915
commit
c085b35fb9
4 changed files with 92 additions and 17 deletions
|
@ -74,6 +74,7 @@ func TestSave(t *testing.T) {
|
|||
return
|
||||
}
|
||||
|
||||
IndentPrefix = "\t"
|
||||
if err := doc.SaveFile("test1.xml"); err != nil {
|
||||
t.Errorf("SaveFile(): %s", err)
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue