diff options
author | Anthony Ramine <[email protected]> | 2010-12-07 23:31:34 +0100 |
---|---|---|
committer | Lars Thorsen <[email protected]> | 2011-11-11 11:58:43 +0100 |
commit | 6d841684ff63ff8cc6295ea4c4461385ab594136 (patch) | |
tree | c53c7bd780ff6208a13d4868d78a6f270536849d /lib/xmerl/src/xmerl_xpath.erl | |
parent | fcf6b58a1f7a2eafa0db79f1715db1c193c3f346 (diff) | |
download | otp-6d841684ff63ff8cc6295ea4c4461385ab594136.tar.gz otp-6d841684ff63ff8cc6295ea4c4461385ab594136.tar.bz2 otp-6d841684ff63ff8cc6295ea4c4461385ab594136.zip |
Accumulate comments in element nodes
Diffstat (limited to 'lib/xmerl/src/xmerl_xpath.erl')
-rw-r--r-- | lib/xmerl/src/xmerl_xpath.erl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/xmerl/src/xmerl_xpath.erl b/lib/xmerl/src/xmerl_xpath.erl index db3d3ac2d6..ee06f08029 100644 --- a/lib/xmerl/src/xmerl_xpath.erl +++ b/lib/xmerl/src/xmerl_xpath.erl @@ -303,6 +303,9 @@ write_node(#xmlNode{pos = Pos, node = #xmlText{value = Txt, parents = Ps}}) -> {text, Pos, Txt, Ps}; +write_node(#xmlNode{pos = Pos, + node = #xmlComment{parents = Ps}}) -> + {comment, Pos, '', Ps}; write_node(_) -> other. @@ -628,6 +631,7 @@ node_type(#xmlElement{}) -> element; node_type(#xmlText{}) -> text; node_type(#xmlPI{}) -> processing_instruction; node_type(#xmlNamespace{}) -> namespace; +node_type(#xmlComment{}) -> comment; node_type(#xmlDocument{}) -> root_node. %% "The namespace axis contains the namespace nodes of the context node; @@ -730,6 +734,8 @@ node_test({node_type, NT}, #xmlNode{node = N}, _Context) -> true; {namespace, #xmlNamespace{}} -> true; + {comment, #xmlComment{}} -> + true; _ -> false end; |