From 58a522ded9e5e4cdcaea35e489d9e846991c83f7 Mon Sep 17 00:00:00 2001 From: alignedleft Date: Wed, 19 Dec 2012 23:41:23 +0000 Subject: [PATCH] Added reference for saveXML() --- core/src/processing/core/PApplet.java | 28 ++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/core/src/processing/core/PApplet.java b/core/src/processing/core/PApplet.java index 7b89698fd..aae783760 100644 --- a/core/src/processing/core/PApplet.java +++ b/core/src/processing/core/PApplet.java @@ -5812,7 +5812,15 @@ public class PApplet extends Applet // DATA I/O - + /** + * xxxxxx scott is cleaning this up + * + * @webref input:files + * @brief Creates a new XML object + * @param data the content to be parsed as XML + * @return an XML object, or null + * @see PApplet#loadXML(String) + */ public XML createXML(String name) { try { return new XML(name); @@ -5822,11 +5830,11 @@ public class PApplet extends Applet } } - /** * @webref input:files * @param filename name of a file in the data folder or a URL. * @see PApplet#parseXML(String) + * @see PApplet#saveXML(String) * @see PApplet#loadBytes(String) * @see PApplet#loadStrings(String) * @see PApplet#loadTable(String) @@ -5835,7 +5843,6 @@ public class PApplet extends Applet return loadXML(filename, null); } - // version that uses 'options' though there are currently no supported options public XML loadXML(String filename, String options) { try { @@ -5852,12 +5859,12 @@ public class PApplet extends Applet * @param data the content to be parsed as XML * @return an XML object, or null * @see PApplet#loadXML(String) + * @see PApplet#saveXML(String) */ public XML parseXML(String xmlString) { return parseXML(xmlString, null); } - - + public XML parseXML(String xmlString, String options) { try { return XML.parse(xmlString, options); @@ -5867,17 +5874,24 @@ public class PApplet extends Applet } } - + /** + * @webref output:files + * @param xml the XML object to save to disk + * @param filename name of the file to write to + * @see PApplet#loadXML(String) + * @see PApplet#parseXML(String) + */ public boolean saveXML(XML xml, String filename) { return saveXML(xml, filename, null); } - public boolean saveXML(XML xml, String filename, String options) { return xml.save(saveFile(filename), options); } + + public Table createTable() { return new Table(); }