Debian Codegraph @

rhino/testsrc/doctests/xmlOptions.doctest

raw
1 // This Source Code Form is subject to the terms of the Mozilla Public
2 // License, v. 2.0. If a copy of the MPL was not distributed with this
3 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
4
5 js> var x = <foo><bar><baz>1</baz></bar></foo>;
6 js> x
7 <foo>
8 <bar>
9 <baz>1</baz>
10 </bar>
11 </foo>
12 js> var xmlLib = org.mozilla.javascript.xml.XMLLib.extractFromScope(this);
13 js> xmlLib.isPrettyPrinting();
14 true
15 js> xmlLib.setPrettyPrinting(false);
16 js> xmlLib.isPrettyPrinting();
17 false
18 js> x
19 <foo><bar><baz>1</baz></bar></foo>