Skip to content

Commit

Permalink
use iselement
Browse files Browse the repository at this point in the history
  • Loading branch information
bicycle1885 committed Nov 24, 2016
1 parent bbce701 commit 583adf8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/document.jl
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ end
Set the root element of `doc` to `node` and return the root element.
"""
function setroot!(doc::Document, root::Node)
if nodetype(root) != ELEMENT_NODE
if !iselement(root)
throw(ArgumentError("not an element node"))
end
old_root_ptr = ccall(
Expand Down
2 changes: 1 addition & 1 deletion src/node.jl
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ end
Count the number of attributes of `elem`.
"""
function countattributes(elem::Node)
if nodetype(elem) != ELEMENT_NODE
if !iselement(elem)
throw(ArgumentError("not an element node"))
end
n = 0
Expand Down

0 comments on commit 583adf8

Please sign in to comment.