MCPcopy Create free account
hub / github.com/antchfx/xmlquery / sanitizedData

Method sanitizedData

node.go:170–175  ·  view source on GitHub ↗
(preserveSpaces bool)

Source from the content-addressed store, hash-verified

168}
169
170func (n *Node) sanitizedData(preserveSpaces bool) string {
171 if preserveSpaces {
172 return n.Data
173 }
174 return strings.TrimSpace(n.Data)
175}
176
177func calculatePreserveSpaces(n *Node, pastValue bool) bool {
178 if attr := n.SelectAttr("xml:space"); attr == "preserve" {

Callers 1

outputXMLFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected