XmlElement¶
scene.spad line 3780 [edit on github]
This package provides support for XML
files an XML
element is something which either has the form: <tagname attributes> content </tagname> or <tagname attributes/> where content may be a sequence of sub-elements or unstructured text
- coerce: % -> List String
coerce(x)
outputsx
as a list of strings. Each element in the list represents a new line. This is an alternative to creating a long single string with ‘newline’ embedded in it.
- empty?: % -> Boolean
empty?(el)
returnstrue
is this element does not contain anything
- outputVRML: (%, TextFile) -> Void
outputVRML(rp, f1)
writes the element asVRML2
.VRML2
is notxml
but it has the same semantics and node names asX3D
but a different syntax so it makes sense to create anXML
structure and then format the output differently.
- xmlElement: (String, List %, List XmlAttribute) -> %
xmlElement(name, elements, attributes)
construct an element with structuredelements
- xmlElement: (String, String, List XmlAttribute) -> %
xmlElement(name, txt, attributes)
construct an element with unstructured text