You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove dependency on ZipFiles.jl and EzXML.jl (#280)
* Remove remaining dependency on ZipFile.jl
* Remove overlooked use of ZipFile
* No need to close zip io any longer
* No need to close zip io any longer
* Now also removed dependency on EzXML.jl except for calls to the
overloaded findall() and findfirst() functions and a single call
to EzXMLunlnk().
* Replace EzXML.findall() with a new find_all_nodes()
function that uses the XML.jl API.
* Replaced EzXML.findfirst() with find_all_nodes()[begin]
* Further changes to unlink rows in write.jl
* Yesterday's changes
* Finally got SheetRowStreamIterator to work!
* Further changes bug fixing failed tests
* Force recompile?
* Now passing all tests except `escape`
* Clean up remaining open and close actions
* Final fixes to escape tests
* Remove unnecesaary data files
* Tidy-up
* Don't pretty print
* Remove last pretty printing example
* Simplify regex that undoes pretty printing
@@ -33,25 +33,27 @@ function find_t_node_recursively(n::EzXML.Node) :: Union{Nothing, EzXML.Node}
33
33
returnnothing
34
34
end
35
35
36
-
functionCell(c::EzXML.Node)
36
+
functionCell(c::XML.LazyNode)
37
37
# c (Cell) element is defined at section 18.3.1.4
38
38
# t (Cell Data Type) is an enumeration representing the cell's data type. The possible values for this attribute are defined by the ST_CellType simple type (§18.18.11).
39
39
# s (Style Index) is the index of this cell's style. Style records are stored in the Styles Part.
40
40
41
-
@assertEzXML.nodename(c) =="c""`Cell` Expects a `c` (cell) XML node."
41
+
@assertXML.tag(c) =="c""`Cell` Expects a `c` (cell) XML node."
42
42
43
-
ref =CellRef(c["r"])
43
+
a = XML.attributes(c) # Dict of cell attributes
44
+
45
+
ref =CellRef(a["r"])
44
46
45
47
# type
46
-
ifhaskey(c, "t")
47
-
t =c["t"]
48
+
ifhaskey(a, "t")
49
+
t =a["t"]
48
50
else
49
51
t =""
50
52
end
51
53
52
54
# style
53
-
ifhaskey(c, "s")
54
-
s =c["s"]
55
+
ifhaskey(a, "s")
56
+
s =a["s"]
55
57
else
56
58
s =""
57
59
end
@@ -62,29 +64,35 @@ function Cell(c::EzXML.Node)
62
64
local found_v::Bool=false
63
65
local found_f::Bool=false
64
66
65
-
for c_child_element in EzXML.eachelement(c)
66
-
67
+
for c_child_element in XML.children(c)
67
68
if t =="inlineStr"
68
-
69
-
if EzXML.nodename(c_child_element) =="is"
69
+
if XML.tag(c_child_element) =="is"
70
70
t_node =find_t_node_recursively(c_child_element)
71
-
if t_node !=nothing
72
-
v = EzXML.nodecontent(t_node)
71
+
if t_node !==nothing
72
+
c = XML.children(t_node)
73
+
iflength(c) ==0
74
+
v =""
75
+
elseiflength(c) ==1
76
+
v= XML.value(c[1])
77
+
else
78
+
error("Too amny children in `t` node. Expected >=1, found: $(length(c))")
79
+
end
73
80
end
74
81
end
75
82
76
83
else
77
-
ifEzXML.nodename(c_child_element) =="v"
84
+
ifXML.tag(c_child_element) =="v"
78
85
79
86
# we should have only one v element
80
87
if found_v
81
88
error("Unsupported: cell $(ref) has more than 1 `v` elements.")
82
89
else
83
90
found_v =true
84
91
end
92
+
93
+
v = XML.unescape(XML.simple_value(c_child_element))
0 commit comments