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