-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
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
benoitmasson, zapic0 and emicklei
Metadata
Metadata
Assignees
Labels
No labels