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)outputsxas 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)returnstrueis this element does not contain anything
- outputVRML: (%, TextFile) -> Void
outputVRML(rp, f1)writes the element asVRML2.VRML2is notxmlbut it has the same semantics and node names asX3Dbut a different syntax so it makes sense to create anXMLstructure 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