mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
add getContent(defaultValue) to XML
This commit is contained in:
@@ -810,6 +810,12 @@ public class XML implements Serializable {
|
||||
}
|
||||
|
||||
|
||||
public String getContent(String defaultValue) {
|
||||
String s = node.getTextContent();
|
||||
return (s != null) ? s : defaultValue;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @webref xml:method
|
||||
* @brief Gets the content of an element as an int
|
||||
|
||||
@@ -29,6 +29,7 @@ X when using increment() on IntList, make sure the index exists
|
||||
X automatically resize the list if necessary
|
||||
X (this is more in keeping with increment() in the Dict classes)
|
||||
X add join() method to Int/Float/StringList
|
||||
X add getContent(defaultValue) to XML
|
||||
|
||||
cleaning
|
||||
X load/save methods.. is it save("blah.svg") or saveSVG("blah.svg")
|
||||
|
||||
Reference in New Issue
Block a user