You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am having trouble parsing a document fragment that contains elements with namespaces. When added to a node as children, the namespaces are removed even though the namespaces are defined in the root element of the document to which I wish to add the fragment.
varfragment []byte=foo.Fragment()
fmt.Println(fragment) // prints name spaced elementsnode.Child(fragment)
fmt.Println(node) // the elements are added, but the namespaces are removed.
I have also tried to parse the fragment manually with no success in preserving the namespaces.
I have noticed that you are wrapping the fragment with a root element. Nevertheless, the fragment seems to be parsed in the context of a node or document root, which, in my case, has the namespaces defined.
Thank you.
The text was updated successfully, but these errors were encountered:
I am having trouble parsing a document fragment that contains elements with namespaces. When added to a node as children, the namespaces are removed even though the namespaces are defined in the root element of the document to which I wish to add the fragment.
I have also tried to parse the fragment manually with no success in preserving the namespaces.
I have noticed that you are wrapping the fragment with a root element. Nevertheless, the fragment seems to be parsed in the context of a node or document root, which, in my case, has the namespaces defined.
Thank you.
The text was updated successfully, but these errors were encountered: