@@ -89,7 +89,7 @@ function prev(o::LazyNode)
89
89
n. type === RawElementClose ? prev (LazyNode (n)) : LazyNode (n)
90
90
end
91
91
92
- # -----------------------------------------------------------------------------# Node
92
+ # -----------------------------------------------------------------------------?de
93
93
"""
94
94
Node(nodetype, tag, attributes, value, children)
95
95
Node(node::Node; kw...) # copy node with keyword overrides
135
135
136
136
Base. read (filename:: AbstractString , :: Type{Node} ) = Node (read (filename, Raw))
137
137
Base. read (io:: IO , :: Type{Node} ) = Node (read (io, Raw))
138
- Base. parse (x:: AbstractString , :: Type{Node} = Node ) = Node (parse (x, Raw))
138
+ Base. parse (x:: AbstractString , :: Type{Node} ) = Node (parse (x, Raw))
139
139
140
140
Base. setindex! (o:: Node , val, i:: Integer ) = o. children[i] = Node (val)
141
141
Base. push! (a:: Node , b:: Node ) = push! (a. children, b)
210
210
Base.:(== )(a:: AbstractXMLNode , b:: AbstractXMLNode ) = nodes_equal (a, b)
211
211
212
212
# -----------------------------------------------------------------------------# parse
213
- Base. parse (:: Type{T} , str:: AbstractString ) where {T} = parse (str, T)
213
+ Base. parse (:: Type{T} , str:: AbstractString ) where {T <: AbstractXMLNode } = parse (str, T)
214
214
215
215
# -----------------------------------------------------------------------------# indexing
216
216
Base. getindex (o:: Union{Raw, AbstractXMLNode} ) = o
0 commit comments