diff --git a/README.md b/README.md index ddb1156..dab026f 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ doc[end][2] # Second child of root | `Declaration` | `` | `Declaration(; attrs...)` | `ProcessingInstruction` | `` | `ProcessingInstruction(tag; attrs...)` | `Comment` | `` | `Comment(text)` -| `CData` | `` | `CData(text)` +| `CData` | `` | `CData(text)` | `Element` | ` children... ` | `Element(tag, children...; attrs...)` | `Text` | the `text` part of `text` | `Text(text)` diff --git a/src/XML.jl b/src/XML.jl index 273bfda..f33d36e 100644 --- a/src/XML.jl +++ b/src/XML.jl @@ -36,7 +36,7 @@ end - Declaration # - ProcessingInstruction # - Comment # - - CData # + - CData # - Element # children... - Text # text @@ -324,7 +324,7 @@ function _show_node(io::IO, o) printstyled(io, value(o), color=:light_black) printstyled(io, "-->", color=:light_cyan) elseif o.nodetype === CData - printstyled(io, " ", color=:light_cyan) elseif o.nodetype === Document @@ -408,7 +408,7 @@ function write(io::IO, x, ctx::Vector{Bool}=[false]; indentsize::Int=2, depth::I print(io, "") elseif nodetype === CData - print(io, "") + print(io, "") elseif nodetype === Document foreach(children) do child diff --git a/src/raw.jl b/src/raw.jl index 29d0a10..b23411c 100644 --- a/src/raw.jl +++ b/src/raw.jl @@ -3,7 +3,7 @@ RawType: - RawText # text - RawComment # - - RawCData # + - RawCData # - RawDeclaration # - RawProcessingInstruction # - RawDTD # @@ -37,7 +37,7 @@ Create an iterator over raw chunks of data in an XML file. Each chunk of data r - RawDocument # Only used to initialize the iterator state. - RawText # text - RawComment # - - RawCData # + - RawCData # - RawDeclaration # - RawProcessingInstruction # - RawDTD # @@ -271,7 +271,7 @@ function value(o::Raw) if o.type === RawText String(o) elseif o.type === RawCData - String(view(o.data, o.pos+length(" Example KML file - + Time Square - + #style1 -73.984939,40.758874,0.000000 @@ -39,7 +39,7 @@ Central Park - + #style2 @@ -57,7 +57,7 @@ Lincoln Tunnel - + #style3 1 diff --git a/test/runtests.jl b/test/runtests.jl index 89978eb..1bd698e 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -78,7 +78,7 @@ end tag=nothing, attributes=nothing, value=" comment "), - (xml = "", + (xml = "", nodetype = CData, tag=nothing, attributes=nothing,