diff --git a/mozilla/js/rhino/src/org/mozilla/javascript/xml/XMLLib.java b/mozilla/js/rhino/src/org/mozilla/javascript/xml/XMLLib.java
index da92dde2cb2..343c938c9f0 100644
--- a/mozilla/js/rhino/src/org/mozilla/javascript/xml/XMLLib.java
+++ b/mozilla/js/rhino/src/org/mozilla/javascript/xml/XMLLib.java
@@ -130,4 +130,44 @@ public abstract class XMLLib
* Construct namespace for default xml statement.
*/
public abstract Object toDefaultXmlNamespace(Context cx, Object uriValue);
+
+ public void setIgnoreComments(boolean b) {
+ throw new UnsupportedOperationException();
+ }
+
+ public void setIgnoreWhitespace(boolean b) {
+ throw new UnsupportedOperationException();
+ }
+
+ public void setIgnoreProcessingInstructions(boolean b) {
+ throw new UnsupportedOperationException();
+ }
+
+ public void setPrettyPrinting(boolean b) {
+ throw new UnsupportedOperationException();
+ }
+
+ public void setPrettyIndent(int i) {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isIgnoreComments() {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isIgnoreProcessingInstructions() {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isIgnoreWhitespace() {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isPrettyPrinting() {
+ throw new UnsupportedOperationException();
+ }
+
+ public int getPrettyIndent() {
+ throw new UnsupportedOperationException();
+ }
}
diff --git a/mozilla/js/rhino/testsrc/doctests/xmlOptions.doctest b/mozilla/js/rhino/testsrc/doctests/xmlOptions.doctest
new file mode 100755
index 00000000000..f9b1bffabf1
--- /dev/null
+++ b/mozilla/js/rhino/testsrc/doctests/xmlOptions.doctest
@@ -0,0 +1,15 @@
+js> var x = 1;
+js> x
+
+
+ 1
+
+
+js> var xmlLib = org.mozilla.javascript.xml.XMLLib.extractFromScope(this);
+js> xmlLib.isPrettyPrinting();
+true
+js> xmlLib.setPrettyPrinting(false);
+js> xmlLib.isPrettyPrinting();
+false
+js> x
+1
\ No newline at end of file
diff --git a/mozilla/js/rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLLibImpl.java b/mozilla/js/rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLLibImpl.java
index 1713b01049e..23a70bdb58d 100644
--- a/mozilla/js/rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLLibImpl.java
+++ b/mozilla/js/rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLLibImpl.java
@@ -72,6 +72,47 @@ public final class XMLLibImpl extends XMLLib implements Serializable {
lib.exportToScope(sealed);
}
}
+
+ public void setIgnoreComments(boolean b) {
+ options.setIgnoreComments(b);
+ }
+
+ public void setIgnoreWhitespace(boolean b) {
+ options.setIgnoreWhitespace(b);
+ }
+
+ public void setIgnoreProcessingInstructions(boolean b) {
+ options.setIgnoreProcessingInstructions(b);
+ }
+
+ public void setPrettyPrinting(boolean b) {
+ options.setPrettyPrinting(b);
+ }
+
+ public void setPrettyIndent(int i) {
+ options.setPrettyIndent(i);
+ }
+
+ public boolean isIgnoreComments() {
+ return options.isIgnoreComments();
+ }
+
+ public boolean isIgnoreProcessingInstructions() {
+ return options.isIgnoreProcessingInstructions();
+ }
+
+ public boolean isIgnoreWhitespace() {
+ return options.isIgnoreWhitespace();
+ }
+
+ public boolean isPrettyPrinting() {
+ return options.isPrettyPrinting();
+ }
+
+ public int getPrettyIndent() {
+ return options.getPrettyIndent();
+ }
+
private Scriptable globalScope;