MCPcopy Index your code
hub / github.com/benfry/processing4 / XML

Class XML

core/src/processing/data/XML.java:58–1221  ·  view source on GitHub ↗

XML is a representation of an XML object, able to parse XML code. Use loadXML() to load external XML files and create XML objects. Only files encoded as UTF-8 (or plain ASCII) are parsed properly; the encoding parameter inside XML files is ignor

Source from the content-addressed store, hash-verified

56 * @see PApplet#saveXML(XML, String)
57 */
58public class XML implements Serializable {
59
60 /** The internal representation, a DOM node. */
61 protected Node node;
62
63// /** Cached locally because it's used often. */
64// protected String name;
65
66 /** The parent element. */
67 protected XML parent;
68
69 /** Child elements, once loaded. */
70 protected XML[] children;
71
72 /**
73 * @nowebref
74 */
75 protected XML() { }
76
77
78// /**
79// * Begin parsing XML data passed in from a PApplet. This code
80// * wraps exception handling, for more advanced exception handling,
81// * use the constructor that takes a Reader or InputStream.
82// *
83// * @throws SAXException
84// * @throws ParserConfigurationException
85// * @throws IOException
86// */
87// public XML(PApplet parent, String filename) throws IOException, ParserConfigurationException, SAXException {
88// this(parent.createReader(filename));
89// }
90
91
92 /**
93 * Advanced users only; use loadXML() in PApplet. This is not a supported
94 * function and is subject to change. It is available simply for users that
95 * would like to handle the exceptions in a particular way.
96 *
97 * @nowebref
98 */
99 public XML(File file) throws IOException, ParserConfigurationException, SAXException {
100 this(file, null);
101 }
102
103
104 /**
105 * Advanced users only; use loadXML() in PApplet.
106 *
107 * @nowebref
108 */
109 public XML(File file, String options) throws IOException, ParserConfigurationException, SAXException {
110 this(PApplet.createReader(file), options);
111 }
112
113 /**
114 * @nowebref
115 */

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected