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
First I am a newbe in golang but I am trying to pass the XML test which is one of the most difficult one for a new language (Who wants to use XML anyway :-) ).
Is there a way to just print the node names that have been matched ?
See below in the iterator for each Node I would like to get only the node name by when I stringify it I get the complete node content.
capability_path := xmlpath.MustCompile("//Capability/Request/*")
root, err := xmlpath.Parse(reader)
if err != nil {
log.Fatal(err)
}
iter := capability_path.Iter(root)
for iter.Next() {
elem := iter.Node()
fmt.Println("Found:[", elem.String(),"]")
}
Thank in advance
The text was updated successfully, but these errors were encountered:
First I am a newbe in golang but I am trying to pass the XML test which is one of the most difficult one for a new language (Who wants to use XML anyway :-) ).
Is there a way to just print the node names that have been matched ?
See below in the iterator for each Node I would like to get only the node name by when I stringify it I get the complete node content.
Thank in advance
The text was updated successfully, but these errors were encountered: