mirror of
https://github.com/processing/processing4.git
synced 2026-02-12 01:50:44 +01:00
more with method naming, add XML hasChildren() method
This commit is contained in:
@@ -72,7 +72,7 @@ public class XML implements Serializable {
|
||||
this(PApplet.createReader(file));
|
||||
}
|
||||
|
||||
|
||||
|
||||
public XML(Reader reader) {
|
||||
try {
|
||||
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
|
||||
@@ -240,6 +240,12 @@ public class XML implements Serializable {
|
||||
}
|
||||
|
||||
|
||||
public boolean hasChildren() {
|
||||
checkChildren();
|
||||
return children.length > 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Put the names of all children into an array. Same as looping through
|
||||
* each child and calling getName() on each XMLElement.
|
||||
|
||||
Reference in New Issue
Block a user