Skip to content

Commit b6f934f

Browse files
authored
Merge pull request #29 from guo-yong-zhi/patch-1
support pushfirst!(parent::Node, child::Node)
2 parents 58f1b5a + cf2dc30 commit b6f934f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/XML.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ Base.parse(x::AbstractString, ::Type{Node}) = Node(parse(x, Raw))
202202

203203
Base.setindex!(o::Node, val, i::Integer) = o.children[i] = Node(val)
204204
Base.push!(a::Node, b::Node) = push!(a.children, b)
205+
Base.pushfirst!(a::Node, b::Node) = pushfirst!(a.children, b)
205206

206207
Base.setindex!(o::Node, val, key::AbstractString) = (o.attributes[key] = string(val))
207208
Base.getindex(o::Node, val::AbstractString) = o.attributes[val]

0 commit comments

Comments
 (0)