API cleanups, fix #1660 and #1680 for JSON, plus #1734 for Table

This commit is contained in:
Ben Fry
2013-04-28 20:43:49 -04:00
parent 3ab855e69a
commit b56459d14f
6 changed files with 166 additions and 147 deletions

View File

@@ -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);
}
}