@@ -34,7 +34,7 @@ func NodeToJSON(node *xmlquery.Node, depth int) interface{} {
3434 case xmlquery .ElementNode :
3535 childResult := nodeToJSONInternal (child , depth )
3636 result [child .Data ] = childResult
37- case xmlquery .TextNode , xmlquery .CharDataNode : // Text and CDATA
37+ case xmlquery .TextNode , xmlquery .CharDataNode :
3838 text := strings .TrimSpace (child .Data )
3939 if text != "" {
4040 textParts = append (textParts , text )
@@ -50,7 +50,7 @@ func NodeToJSON(node *xmlquery.Node, depth int) interface{} {
5050 case xmlquery .ElementNode :
5151 return nodeToJSONInternal (node , depth )
5252
53- case xmlquery .TextNode , xmlquery .CharDataNode : // Text and CDATA
53+ case xmlquery .TextNode , xmlquery .CharDataNode :
5454 return strings .TrimSpace (node .Data )
5555
5656 default :
@@ -71,7 +71,7 @@ func nodeToJSONInternal(node *xmlquery.Node, depth int) interface{} {
7171 var textParts []string
7272 for child := node .FirstChild ; child != nil ; child = child .NextSibling {
7373 switch child .Type {
74- case xmlquery .TextNode , xmlquery .CharDataNode : // Text and CDATA
74+ case xmlquery .TextNode , xmlquery .CharDataNode :
7575 text := strings .TrimSpace (child .Data )
7676 if text != "" {
7777 textParts = append (textParts , text )
@@ -96,7 +96,7 @@ func getTextContent(node *xmlquery.Node) string {
9696 var parts []string
9797 for child := node .FirstChild ; child != nil ; child = child .NextSibling {
9898 switch child .Type {
99- case xmlquery .TextNode , xmlquery .CharDataNode : // Text and CDATA
99+ case xmlquery .TextNode , xmlquery .CharDataNode :
100100 text := strings .TrimSpace (child .Data )
101101 if text != "" {
102102 parts = append (parts , text )
0 commit comments