Skip to content

Commit e3d0323

Browse files
committed
Revert "fix: Improper namespace application in elementToBytes (#580)"
This reverts commit 72fbe6b.
1 parent e985226 commit e3d0323

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

service_provider.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1821,11 +1821,7 @@ func elementToBytes(el *etree.Element) ([]byte, error) {
18211821
doc := etree.NewDocument()
18221822
doc.SetRoot(el.Copy())
18231823
for space, uri := range namespaces {
1824-
if space == "" {
1825-
doc.Root().CreateAttr("xmlns", uri)
1826-
} else {
1827-
doc.Root().CreateAttr("xmlns:"+space, uri)
1828-
}
1824+
doc.Root().CreateAttr("xmlns:"+space, uri)
18291825
}
18301826

18311827
return doc.WriteToBytes()

0 commit comments

Comments
 (0)