This commit is contained in:
Jukka Aho
2017-01-05 11:29:29 +02:00
parent 1630dd1ec0
commit ea94f3a942
2 changed files with 15 additions and 9 deletions
+2 -2
View File
@@ -69,8 +69,8 @@ function get_child(x::XMLElement, child_name::String)
m[2] == "end" && return childs[end]
m2 = match(r"@(.+)=(.+)", m[2])
m2 == nothing && throw("Unable to parse: $(m[2])")
attr_name = m2[1]
attr_value = m2[2]
attr_name = convert(String, m2[1])
attr_value = convert(String, m2[2])
for child in childs
has_attribute(child, attr_name) || continue
if get_attribute(child, attr_name) == attr_value