diff --git a/Project.toml b/Project.toml index cfe864e..e03f58b 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "XML" uuid = "72c71f33-b9b6-44de-8c94-c961784809e2" authors = ["Josh Day and contributors"] -version = "0.3.3" +version = "0.3.4" [deps] Mmap = "a63ad114-7e13-5084-954f-fe012c677804" diff --git a/README.md b/README.md index 40f9d2e..9968fdc 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ attributes(node) → OrderedDict{String, String} or Nothing value(node) → String or Nothing children(node) → Vector{typeof(node)} is_simple(node) → Bool (whether node is simple .e.g. item) -simplevalue(node) → e.g. "item" from item) +simple_value(node) → e.g. "item" from item) ```
@@ -104,12 +104,12 @@ node["key"] ```julia node = XML.Element("tag", XML.Text("child")) -simplevalue(node) +simple_value(node) # "child" node2 = Node(node, children=XML.Text("changed")) -simplevalue(node2) +simple_value(node2) # "changed" ``` diff --git a/src/XML.jl b/src/XML.jl index 171cbd0..942599f 100644 --- a/src/XML.jl +++ b/src/XML.jl @@ -7,7 +7,7 @@ export # Core Types: Node, LazyNode, # Interface: - children, nodetype, tag, attributes, value, is_simple, simplevalue, + children, nodetype, tag, attributes, value, is_simple, simplevalue, simple_value, # Extended Interface for LazyNode: parent, depth, next, prev @@ -339,7 +339,8 @@ function _print_attrs(io::IO, o; color=:normal) attr = attributes(o) isnothing(attr) && return nothing for (k,v) in attr - printstyled(io, ' ', k, '=', '"', v, '"'; color) + # printstyled(io, ' ', k, '=', '"', v, '"'; color) + print(io, ' ', k, '=', '"', v, '"') end end function _print_n_children(io::IO, o::Node)