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
-`using XML.NodeConstructors` will give you access to convenience functions (`document`, `cdata`, `element`, etc.) for creating `Node`s.
63
+
-**XML** defines `(::NodeType)(args...; kw...)` for more convenient syntax in creating `Node`s, e.g.:
64
64
65
65
```julia
66
-
using XML.NodeConstructors
67
-
# cdata, comment, declaration, document, dtd, element, processing_instruction, text
68
-
69
-
cdata("hello > < ' \" I have odd characters")
70
-
# Node CDATA <![CDATA[hello > < ' " I have odd characters]]>
66
+
CData(value)
67
+
Comment(value)
68
+
Declaration(; attributes...)
69
+
Document(children...)
70
+
DTD(; attributes...)
71
+
Element(tag, children...; attributes...)
72
+
ProcessingInstruction(; attributes...)
73
+
Text(value)
71
74
```
72
75
73
76
### `XML.LazyNode`
@@ -77,15 +80,15 @@ A lazy data structure that just keeps track of the position in the raw data (`Ve
77
80
- Iteration in depth first search (DFS) order. This is the natural order in which you would visit XML nodes by reading an XML document from top to bottom.
0 commit comments