mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
change getName() to getLocalName(); and getFullName() to getName()
This commit is contained in:
@@ -234,7 +234,7 @@ public class StdXMLBuilder
|
||||
if (elt.getChildCount() == 1) {
|
||||
XMLElement child = elt.getChildAtIndex(0);
|
||||
|
||||
if (child.getName() == null) {
|
||||
if (child.getLocalName() == null) {
|
||||
elt.setContent(child.getContent());
|
||||
elt.removeChildAtIndex(0);
|
||||
}
|
||||
|
||||
@@ -350,7 +350,7 @@ public class XMLElement implements Serializable {
|
||||
*
|
||||
* @return the name, or null if the element only contains #PCDATA.
|
||||
*/
|
||||
public String getFullName() {
|
||||
public String getName() {
|
||||
return this.fullName;
|
||||
}
|
||||
|
||||
@@ -360,7 +360,7 @@ public class XMLElement implements Serializable {
|
||||
*
|
||||
* @return the name, or null if the element only contains #PCDATA.
|
||||
*/
|
||||
public String getName() {
|
||||
public String getLocalName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
@@ -416,10 +416,10 @@ public class XMLElement implements Serializable {
|
||||
if (child == null) {
|
||||
throw new IllegalArgumentException("child must not be null");
|
||||
}
|
||||
if ((child.getName() == null) && (! this.children.isEmpty())) {
|
||||
if ((child.getLocalName() == null) && (! this.children.isEmpty())) {
|
||||
XMLElement lastChild = (XMLElement) this.children.lastElement();
|
||||
|
||||
if (lastChild.getName() == null) {
|
||||
if (lastChild.getLocalName() == null) {
|
||||
lastChild.setContent(lastChild.getContent()
|
||||
+ child.getContent());
|
||||
return;
|
||||
@@ -440,9 +440,9 @@ public class XMLElement implements Serializable {
|
||||
if (child == null) {
|
||||
throw new IllegalArgumentException("child must not be null");
|
||||
}
|
||||
if ((child.getName() == null) && (! this.children.isEmpty())) {
|
||||
if ((child.getLocalName() == null) && (! this.children.isEmpty())) {
|
||||
XMLElement lastChild = (XMLElement) this.children.lastElement();
|
||||
if (lastChild.getName() == null) {
|
||||
if (lastChild.getLocalName() == null) {
|
||||
lastChild.setContent(lastChild.getContent()
|
||||
+ child.getContent());
|
||||
return;
|
||||
@@ -559,7 +559,7 @@ public class XMLElement implements Serializable {
|
||||
int childCount = getChildCount();
|
||||
for (int i = 0; i < childCount; i++) {
|
||||
XMLElement kid = getChild(i);
|
||||
if (kid.getFullName().equals(name)) {
|
||||
if (kid.getName().equals(name)) {
|
||||
return kid;
|
||||
}
|
||||
}
|
||||
@@ -587,7 +587,7 @@ public class XMLElement implements Serializable {
|
||||
int childCount = getChildCount();
|
||||
for (int i = 0; i < childCount; i++) {
|
||||
XMLElement kid = getChild(i);
|
||||
if (kid.getFullName().equals(items[offset])) {
|
||||
if (kid.getName().equals(items[offset])) {
|
||||
if (offset == items.length-1) {
|
||||
return kid;
|
||||
} else {
|
||||
@@ -685,7 +685,7 @@ public class XMLElement implements Serializable {
|
||||
int matchCount = 0;
|
||||
for (int i = 0; i < childCount; i++) {
|
||||
XMLElement kid = getChild(i);
|
||||
if (kid.getFullName().equals(name)) {
|
||||
if (kid.getName().equals(name)) {
|
||||
matches[matchCount++] = kid;
|
||||
}
|
||||
}
|
||||
@@ -1279,7 +1279,7 @@ public class XMLElement implements Serializable {
|
||||
* @param rawElement the element to compare to
|
||||
*/
|
||||
public boolean equalsXMLElement(XMLElement elt) {
|
||||
if (! this.name.equals(elt.getName())) {
|
||||
if (! this.name.equals(elt.getLocalName())) {
|
||||
return false;
|
||||
}
|
||||
if (this.attributes.size() != elt.getAttributeCount()) {
|
||||
|
||||
@@ -156,7 +156,7 @@ public class XMLWriter
|
||||
}
|
||||
}
|
||||
|
||||
if (xml.getName() == null) {
|
||||
if (xml.getLocalName() == null) {
|
||||
if (xml.getContent() != null) {
|
||||
if (prettyPrint) {
|
||||
this.writeEncoded(xml.getContent().trim());
|
||||
@@ -167,14 +167,14 @@ public class XMLWriter
|
||||
}
|
||||
} else {
|
||||
this.writer.print('<');
|
||||
this.writer.print(xml.getFullName());
|
||||
this.writer.print(xml.getName());
|
||||
Vector nsprefixes = new Vector();
|
||||
|
||||
if (xml.getNamespace() != null) {
|
||||
if (xml.getName().equals(xml.getFullName())) {
|
||||
if (xml.getLocalName().equals(xml.getName())) {
|
||||
this.writer.print(" xmlns=\"" + xml.getNamespace() + '"');
|
||||
} else {
|
||||
String prefix = xml.getFullName();
|
||||
String prefix = xml.getName();
|
||||
prefix = prefix.substring(0, prefix.indexOf(':'));
|
||||
nsprefixes.addElement(prefix);
|
||||
this.writer.print(" xmlns:" + prefix);
|
||||
@@ -217,7 +217,7 @@ public class XMLWriter
|
||||
&& (xml.getContent().length() > 0)) {
|
||||
writer.print('>');
|
||||
this.writeEncoded(xml.getContent());
|
||||
writer.print("</" + xml.getFullName() + '>');
|
||||
writer.print("</" + xml.getName() + '>');
|
||||
|
||||
if (prettyPrint) {
|
||||
writer.println();
|
||||
@@ -243,7 +243,7 @@ public class XMLWriter
|
||||
}
|
||||
}
|
||||
|
||||
this.writer.print("</" + xml.getFullName() + ">");
|
||||
this.writer.print("</" + xml.getName() + ">");
|
||||
|
||||
if (prettyPrint) {
|
||||
writer.println();
|
||||
|
||||
Reference in New Issue
Block a user