zhengchun

Results 63 comments of zhengchun

You mean the `` block missing a ``? I think if `CDATA` missing `

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.

Hello,`level` is designed only for `Node` to calculate parent and child, I don't see a reason to use it by externally package, it doesn't make any sense . Can you...

You have an alternative method to get level of node without expose this field. for example. ``` topnode: =node.Parent level:=0 for node:=topnode.FirstChild; node!=nil; node=node.NextSibling { level++ fmt.Println(node+":"+level) } ```

Sorry, there is no way to get it. if XML have a namespace, you must specify a prefix to query. you can see this https://github.com/antchfx/xmlquery/issues/1

Maybe this method can help you if you don't care about namespace in XML. you can replace all `pd:` string to empty string before parse XML document, then query by...

Good work. I have tested the code. I found `DeclarationNode` node will missing its attribute values when called `Format()` for example: ```go xml := ` ` doc, _:= xmlquery.Parse(strings.NewReader(xml)) fmt.Println(xmlquery.Format(doc))...

The parser is parsing your XML file got an error, not get valid XML.

Hello, which version are you using? I test on my machine with the latest version, the output is not problem. output: `hellomy friend`