mirror of
https://github.com/processing/processing4.git
synced 2026-02-15 03:15:40 +01:00
@@ -167,14 +167,18 @@ public class XML implements Serializable {
|
||||
/**
|
||||
* @param name description TBD
|
||||
*/
|
||||
// TODO is there a more efficient way of doing this? wow.
|
||||
public XML(String name) throws ParserConfigurationException {
|
||||
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
|
||||
DocumentBuilder builder = factory.newDocumentBuilder();
|
||||
Document document = builder.newDocument();
|
||||
node = document.createElement(name);
|
||||
// this.name = name;
|
||||
this.parent = null;
|
||||
public XML(String name) {
|
||||
try {
|
||||
// TODO is there a more efficient way of doing this? wow.
|
||||
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
|
||||
DocumentBuilder builder = factory.newDocumentBuilder();
|
||||
Document document = builder.newDocument();
|
||||
node = document.createElement(name);
|
||||
this.parent = null;
|
||||
|
||||
} catch (ParserConfigurationException pce) {
|
||||
throw new RuntimeException(pce);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user