xmlquery
xmlquery copied to clipboard
Adding new functions to Node
Basically, all functions defined in
https://github.com/antchfx/xmlquery/blob/e73954f0f504eaf97f73ad62a4c52419e304b7bd/node_test.go#L11-L69
are necessary for me for my node navigation & checking, and I'd like to move them into node and expose them,
while changing (in node.go
alone)
-
testNode
tofunc IsNode(n *Node, expected string) bool
-
testAttr
tofunc HasAttr(n *Node, expected string) bool
and -
testValue
tofunc HasValue(val, expected interface{}) bool
OK?
It makes no sense to add IsNode
, HasAttr
and HasValue
to node.go
. Node
already have InnerText()
and SelectAttr()
to help finish these logical operation.
OK. I'll leave them alone.
How about the rest of the functions then?
Ping
How about the rest of the functions?