Skip to content

Commit fd3a751

Browse files
committed
allow the attribute argument to be other types
1 parent 037e7d6 commit fd3a751

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/nodes.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,8 @@ function set_attribute(x::XMLElement, name::ASCIIString, val::ASCIIString)
315315
return XMLAttr(a)
316316
end
317317

318+
set_attribute(x::XMLElement, name::ASCIIString, val) = set_attribute(x, name, string(val))
319+
318320
function set_attributes{P<:NTuple{2}}(x::XMLElement, attrs::AbstractArray{P})
319321
for (nam, val) in attrs
320322
set_attribute(x, string(nam), string(val))

0 commit comments

Comments
 (0)