mirror of
https://github.com/processing/processing4.git
synced 2026-02-15 03:15:40 +01: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
|
||||
|
||||
Reference in New Issue
Block a user