/usr/share/doc/libjenkins-dom4j-java/api/org/dom4j/io/HTMLWriter.html is in libjenkins-dom4j-java-doc 1.6.1-jenkins-4-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_65) on Thu Sep 11 11:01:38 UTC 2014 -->
<title>HTMLWriter (dom4j API)</title>
<meta name="date" content="2014-09-11">
<link rel="stylesheet" type="text/css" href="../../../javadoc.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="HTMLWriter (dom4j API)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/HTMLWriter.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../org/dom4j/io/ElementModifier.html" title="interface in org.dom4j.io"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../org/dom4j/io/OutputFormat.html" title="class in org.dom4j.io"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?org/dom4j/io/HTMLWriter.html" target="_top">Frames</a></li>
<li><a href="HTMLWriter.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li><a href="#field_summary">Field</a> | </li>
<li><a href="#constructor_summary">Constr</a> | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li><a href="#field_detail">Field</a> | </li>
<li><a href="#constructor_detail">Constr</a> | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.dom4j.io</div>
<h2 title="Class HTMLWriter" class="title">Class HTMLWriter</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.xml.sax.helpers.XMLFilterImpl</li>
<li>
<ul class="inheritance">
<li><a href="../../../org/dom4j/io/XMLWriter.html" title="class in org.dom4j.io">org.dom4j.io.XMLWriter</a></li>
<li>
<ul class="inheritance">
<li>org.dom4j.io.HTMLWriter</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd>org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler, org.xml.sax.ext.LexicalHandler, org.xml.sax.XMLFilter, org.xml.sax.XMLReader</dd>
</dl>
<hr>
<br>
<pre>public class <span class="strong">HTMLWriter</span>
extends <a href="../../../org/dom4j/io/XMLWriter.html" title="class in org.dom4j.io">XMLWriter</a></pre>
<div class="block"><p>
<code>HTMLWriter</code> takes a DOM4J tree and formats it to a stream as
HTML. This formatter is similar to XMLWriter but it outputs the text of CDATA
and Entity sections rather than the serialised format as in XML, it has an
XHTML mode, it retains whitespace in certain elements such as <PRE>,
and it supports certain elements which have no corresponding close tag such
as for <BR> and <P>.
</p>
<p>
The OutputFormat passed in to the constructor is checked for isXHTML() and
isExpandEmptyElements(). See <a href="../../../org/dom4j/io/OutputFormat.html" title="class in org.dom4j.io"><code>OutputFormat</code></a>for details.
Here are the rules for <b>this class </b> based on an OutputFormat, "format",
passed in to the constructor: <br/><br/>
<ul>
<li>If an element is in <a href="../../../org/dom4j/io/HTMLWriter.html#getOmitElementCloseSet()"><code>getOmitElementCloseSet</code></a>, then it is treated specially:
<ul>
<li>It never expands, since some browsers treat this as two separate
Horizontal Rules: <HR></HR></li>
<li>If <a href="../../../org/dom4j/io/OutputFormat.html#isXHTML()"><code>format.isXHTML()</code></a>, then
it has a space before the closing single-tag slash, since Netscape 4.x-
treats this: <HR /> as an element named "HR" with an attribute named
"/", but that's better than when it refuses to recognize this: <hr/>
which it thinks is an element named "HR/".</li>
</ul>
</li>
<li>If <a href="../../../org/dom4j/io/OutputFormat.html#isXHTML()"><code>format.isXHTML()</code></a>, all
elements must have either a close element, or be a closed single tag.</li>
<li>If <a href="../../../org/dom4j/io/OutputFormat.html#isExpandEmptyElements()"><code>format.isExpandEmptyElements()</code></a>() is true, all elements are expanded except
as above.</li>
</ul>
<b>Examples </b>
</p>
<p>
</p>
<p>
If isXHTML == true, CDATA sections look like this:
<PRE>
<b><myelement><![CDATA[My data]]></myelement> </b>
</PRE>
Otherwise, they look like this:
<PRE>
<b><myelement>My data</myelement> </b>
</PRE>
</p>
<p>
Basically, <code>OutputFormat.isXHTML()</code> ==
<code>true</code> will produce valid XML, while <a href="../../../org/dom4j/io/OutputFormat.html#isExpandEmptyElements()"><code>format.isExpandEmptyElements()</code></a> determines whether empty elements are
expanded if isXHTML is true, excepting the special HTML single tags.
</p>
<p>
Also, HTMLWriter handles tags whose contents should be preformatted, that is,
whitespace-preserved. By default, this set includes the tags <PRE>,
<SCRIPT>, <STYLE>, and <TEXTAREA>, case insensitively. It
does not include <IFRAME>. Other tags, such as <CODE>,
<KBD>, <TT>, <VAR>, are usually rendered in a different
font in most browsers, but don't preserve whitespace, so they also don't
appear in the default list. HTML Comments are always whitespace-preserved.
However, the parser you use may store comments with linefeed-only text nodes
(\n) even if your platform uses another line.separator character, and
HTMLWriter outputs Comment nodes exactly as the DOM is set up by the parser.
See examples and discussion here:
</p>
<p>
<b>Examples </b>
</p>
<blockquote>
<p>
<b>Pretty Printing </b>
</p>
<p>
This example shows how to pretty print a string containing a valid HTML
document to a string. You can also just call the static methods of this
class: <br>
<a href="../../../org/dom4j/io/HTMLWriter.html#prettyPrintHTML(java.lang.String)"><code>prettyPrintHTML(String)</code></a>or <br>
<a href="../../../org/dom4j/io/HTMLWriter.html#prettyPrintHTML(java.lang.String,%20boolean,%20boolean,%20boolean,%20boolean)"><code>prettyPrintHTML(String,boolean,boolean,boolean,boolean)</code></a> or, <br>
<a href="../../../org/dom4j/io/HTMLWriter.html#prettyPrintXHTML(java.lang.String)"><code>prettyPrintXHTML(String)</code></a>for XHTML (note
the X)
</p>
<pre>
String testPrettyPrint(String html) {
StringWriter sw = new StringWriter();
OutputFormat format = OutputFormat.createPrettyPrint();
// These are the default values for createPrettyPrint,
// so you needn't set them:
// format.setNewlines(true);
// format.setTrimText(true);</font>
format.setXHTML(true);
HTMLWriter writer = new HTMLWriter(sw, format);
Document document = DocumentHelper.parseText(html);
writer.write(document);
writer.flush();
return sw.toString();
}
</pre>
<p>
This example shows how to create a "squeezed" document, but one that will
work in browsers even if the browser line length is limited. No newlines are
included, no extra whitespace at all, except where it it required by
<a href="../../../org/dom4j/io/HTMLWriter.html#setPreformattedTags(java.util.Set)"><code>setPreformattedTags</code></a>.
</p>
<pre>
String testCrunch(String html) {
StringWriter sw = new StringWriter();
OutputFormat format = OutputFormat.createPrettyPrint();
format.setNewlines(false);
format.setTrimText(true);
format.setIndent("");
format.setXHTML(true);
format.setExpandEmptyElements(false);
format.setNewLineAfterNTags(20);
org.dom4j.io.HTMLWriter writer = new HTMLWriter(sw, format);
org.dom4j.Document document = DocumentHelper.parseText(html);
writer.write(document);
writer.flush();
return sw.toString();
}
</pre>
</blockquote></div>
<dl><dt><span class="strong">Version:</span></dt>
<dd>$Revision: 1.21 $</dd>
<dt><span class="strong">Author:</span></dt>
<dd><a href="mailto:james.strachan@metastuff.com">James Strachan </a>, Laramie Crocker</dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected static <a href="../../../org/dom4j/io/OutputFormat.html" title="class in org.dom4j.io">OutputFormat</a></code></td>
<td class="colLast"><code><strong><a href="../../../org/dom4j/io/HTMLWriter.html#DEFAULT_HTML_FORMAT">DEFAULT_HTML_FORMAT</a></strong></code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected static java.util.HashSet</code></td>
<td class="colLast"><code><strong><a href="../../../org/dom4j/io/HTMLWriter.html#DEFAULT_PREFORMATTED_TAGS">DEFAULT_PREFORMATTED_TAGS</a></strong></code> </td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="fields_inherited_from_class_org.dom4j.io.XMLWriter">
<!-- -->
</a>
<h3>Fields inherited from class org.dom4j.io.<a href="../../../org/dom4j/io/XMLWriter.html" title="class in org.dom4j.io">XMLWriter</a></h3>
<code><a href="../../../org/dom4j/io/XMLWriter.html#DEFAULT_FORMAT">DEFAULT_FORMAT</a>, <a href="../../../org/dom4j/io/XMLWriter.html#lastOutputNodeType">lastOutputNodeType</a>, <a href="../../../org/dom4j/io/XMLWriter.html#LEXICAL_HANDLER_NAMES">LEXICAL_HANDLER_NAMES</a>, <a href="../../../org/dom4j/io/XMLWriter.html#preserve">preserve</a>, <a href="../../../org/dom4j/io/XMLWriter.html#writer">writer</a></code></li>
</ul>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../org/dom4j/io/HTMLWriter.html#HTMLWriter()">HTMLWriter</a></strong>()</code> </td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../org/dom4j/io/HTMLWriter.html#HTMLWriter(org.dom4j.io.OutputFormat)">HTMLWriter</a></strong>(<a href="../../../org/dom4j/io/OutputFormat.html" title="class in org.dom4j.io">OutputFormat</a> format)</code> </td>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../org/dom4j/io/HTMLWriter.html#HTMLWriter(java.io.OutputStream)">HTMLWriter</a></strong>(java.io.OutputStream out)</code> </td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../org/dom4j/io/HTMLWriter.html#HTMLWriter(java.io.OutputStream,%20org.dom4j.io.OutputFormat)">HTMLWriter</a></strong>(java.io.OutputStream out,
<a href="../../../org/dom4j/io/OutputFormat.html" title="class in org.dom4j.io">OutputFormat</a> format)</code> </td>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../org/dom4j/io/HTMLWriter.html#HTMLWriter(java.io.Writer)">HTMLWriter</a></strong>(java.io.Writer writer)</code> </td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../org/dom4j/io/HTMLWriter.html#HTMLWriter(java.io.Writer,%20org.dom4j.io.OutputFormat)">HTMLWriter</a></strong>(java.io.Writer writer,
<a href="../../../org/dom4j/io/OutputFormat.html" title="class in org.dom4j.io">OutputFormat</a> format)</code> </td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../org/dom4j/io/HTMLWriter.html#endCDATA()">endCDATA</a></strong>()</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.util.Set</code></td>
<td class="colLast"><code><strong><a href="../../../org/dom4j/io/HTMLWriter.html#getOmitElementCloseSet()">getOmitElementCloseSet</a></strong>()</code>
<div class="block">A clone of the Set of elements that can have their close-tags omitted.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>java.util.Set</code></td>
<td class="colLast"><code><strong><a href="../../../org/dom4j/io/HTMLWriter.html#getPreformattedTags()">getPreformattedTags</a></strong>()</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../org/dom4j/io/HTMLWriter.html#isEnabled()">isEnabled</a></strong>()</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../org/dom4j/io/HTMLWriter.html#isPreformattedTag(java.lang.String)">isPreformattedTag</a></strong>(java.lang.String qualifiedName)</code>
<div class="block">DOCUMENT ME!</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../org/dom4j/io/HTMLWriter.html#loadOmitElementCloseSet(java.util.Set)">loadOmitElementCloseSet</a></strong>(java.util.Set set)</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected boolean</code></td>
<td class="colLast"><code><strong><a href="../../../org/dom4j/io/HTMLWriter.html#omitElementClose(java.lang.String)">omitElementClose</a></strong>(java.lang.String qualifiedName)</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../org/dom4j/io/HTMLWriter.html#prettyPrintHTML(java.lang.String)">prettyPrintHTML</a></strong>(java.lang.String html)</code>
<div class="block">Convenience method to just get a String result.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../org/dom4j/io/HTMLWriter.html#prettyPrintHTML(java.lang.String,%20boolean,%20boolean,%20boolean,%20boolean)">prettyPrintHTML</a></strong>(java.lang.String html,
boolean newlines,
boolean trim,
boolean isXHTML,
boolean expandEmpty)</code>
<div class="block">DOCUMENT ME!</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../org/dom4j/io/HTMLWriter.html#prettyPrintXHTML(java.lang.String)">prettyPrintXHTML</a></strong>(java.lang.String html)</code>
<div class="block">Convenience method to just get a String result, but <b>As XHTML </b>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../org/dom4j/io/HTMLWriter.html#setEnabled(boolean)">setEnabled</a></strong>(boolean enabled)</code>
<div class="block">Enable/disable HTML handling.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../org/dom4j/io/HTMLWriter.html#setOmitElementCloseSet(java.util.Set)">setOmitElementCloseSet</a></strong>(java.util.Set newSet)</code>
<div class="block">To use the empty set, pass an empty Set, or null:</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../org/dom4j/io/HTMLWriter.html#setPreformattedTags(java.util.Set)">setPreformattedTags</a></strong>(java.util.Set newSet)</code>
<div class="block">
Override the default set, which includes PRE, SCRIPT, STYLE, and
TEXTAREA, case insensitively.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../org/dom4j/io/HTMLWriter.html#startCDATA()">startCDATA</a></strong>()</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../org/dom4j/io/HTMLWriter.html#writeCDATA(java.lang.String)">writeCDATA</a></strong>(java.lang.String text)</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../org/dom4j/io/HTMLWriter.html#writeClose(java.lang.String)">writeClose</a></strong>(java.lang.String qualifiedName)</code>
<div class="block">Overriden method to not close certain element names to avoid wierd
behaviour from browsers for versions up to 5.x</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../org/dom4j/io/HTMLWriter.html#writeDeclaration()">writeDeclaration</a></strong>()</code>
<div class="block">
This will write the declaration to the given Writer.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../org/dom4j/io/HTMLWriter.html#writeElement(org.dom4j.Element)">writeElement</a></strong>(<a href="../../../org/dom4j/Element.html" title="interface in org.dom4j">Element</a> element)</code>
<div class="block">This override handles any elements that should not remove whitespace,
such as <PRE>, <SCRIPT>, <STYLE>, and <TEXTAREA>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../org/dom4j/io/HTMLWriter.html#writeEmptyElementClose(java.lang.String)">writeEmptyElementClose</a></strong>(java.lang.String qualifiedName)</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../org/dom4j/io/HTMLWriter.html#writeEntity(org.dom4j.Entity)">writeEntity</a></strong>(<a href="../../../org/dom4j/Entity.html" title="interface in org.dom4j">Entity</a> entity)</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../org/dom4j/io/HTMLWriter.html#writeString(java.lang.String)">writeString</a></strong>(java.lang.String text)</code> </td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_org.dom4j.io.XMLWriter">
<!-- -->
</a>
<h3>Methods inherited from class org.dom4j.io.<a href="../../../org/dom4j/io/XMLWriter.html" title="class in org.dom4j.io">XMLWriter</a></h3>
<code><a href="../../../org/dom4j/io/XMLWriter.html#characters(char[],%20int,%20int)">characters</a>, <a href="../../../org/dom4j/io/XMLWriter.html#close()">close</a>, <a href="../../../org/dom4j/io/XMLWriter.html#comment(char[],%20int,%20int)">comment</a>, <a href="../../../org/dom4j/io/XMLWriter.html#createWriter(java.io.OutputStream,%20java.lang.String)">createWriter</a>, <a href="../../../org/dom4j/io/XMLWriter.html#defaultMaximumAllowedCharacter()">defaultMaximumAllowedCharacter</a>, <a href="../../../org/dom4j/io/XMLWriter.html#endDocument()">endDocument</a>, <a href="../../../org/dom4j/io/XMLWriter.html#endDTD()">endDTD</a>, <a href="../../../org/dom4j/io/XMLWriter.html#endElement(java.lang.String,%20java.lang.String,%20java.lang.String)">endElement</a>, <a href="../../../org/dom4j/io/XMLWriter.html#endEntity(java.lang.String)">endEntity</a>, <a href="../../../org/dom4j/io/XMLWriter.html#endPrefixMapping(java.lang.String)">endPrefixMapping</a>, <a href="../../../org/dom4j/io/XMLWriter.html#escapeAttributeEntities(java.lang.String)">escapeAttributeEntities</a>, <a href="../../../org/dom4j/io/XMLWriter.html#escapeElementEntities(java.lang.String)">escapeElementEntities</a>, <a href="../../../org/dom4j/io/XMLWriter.html#flush()">flush</a>, <a href="../../../org/dom4j/io/XMLWriter.html#getLexicalHandler()">getLexicalHandler</a>, <a href="../../../org/dom4j/io/XMLWriter.html#getMaximumAllowedCharacter()">getMaximumAllowedCharacter</a>, <a href="../../../org/dom4j/io/XMLWriter.html#getOutputFormat()">getOutputFormat</a>, <a href="../../../org/dom4j/io/XMLWriter.html#getProperty(java.lang.String)">getProperty</a>, <a href="../../../org/dom4j/io/XMLWriter.html#handleException(java.io.IOException)">handleException</a>, <a href="../../../org/dom4j/io/XMLWriter.html#ignorableWhitespace(char[],%20int,%20int)">ignorableWhitespace</a>, <a href="../../../org/dom4j/io/XMLWriter.html#indent()">indent</a>, <a href="../../../org/dom4j/io/XMLWriter.html#installLexicalHandler()">installLexicalHandler</a>, <a href="../../../org/dom4j/io/XMLWriter.html#isElementSpacePreserved(org.dom4j.Element)">isElementSpacePreserved</a>, <a href="../../../org/dom4j/io/XMLWriter.html#isEscapeText()">isEscapeText</a>, <a href="../../../org/dom4j/io/XMLWriter.html#isExpandEmptyElements()">isExpandEmptyElements</a>, <a href="../../../org/dom4j/io/XMLWriter.html#isNamespaceDeclaration(org.dom4j.Namespace)">isNamespaceDeclaration</a>, <a href="../../../org/dom4j/io/XMLWriter.html#notationDecl(java.lang.String,%20java.lang.String,%20java.lang.String)">notationDecl</a>, <a href="../../../org/dom4j/io/XMLWriter.html#parse(org.xml.sax.InputSource)">parse</a>, <a href="../../../org/dom4j/io/XMLWriter.html#println()">println</a>, <a href="../../../org/dom4j/io/XMLWriter.html#processingInstruction(java.lang.String,%20java.lang.String)">processingInstruction</a>, <a href="../../../org/dom4j/io/XMLWriter.html#resolveEntityRefs()">resolveEntityRefs</a>, <a href="../../../org/dom4j/io/XMLWriter.html#setDocumentLocator(org.xml.sax.Locator)">setDocumentLocator</a>, <a href="../../../org/dom4j/io/XMLWriter.html#setEscapeText(boolean)">setEscapeText</a>, <a href="../../../org/dom4j/io/XMLWriter.html#setIndentLevel(int)">setIndentLevel</a>, <a href="../../../org/dom4j/io/XMLWriter.html#setLexicalHandler(org.xml.sax.ext.LexicalHandler)">setLexicalHandler</a>, <a href="../../../org/dom4j/io/XMLWriter.html#setMaximumAllowedCharacter(int)">setMaximumAllowedCharacter</a>, <a href="../../../org/dom4j/io/XMLWriter.html#setOutputStream(java.io.OutputStream)">setOutputStream</a>, <a href="../../../org/dom4j/io/XMLWriter.html#setProperty(java.lang.String,%20java.lang.Object)">setProperty</a>, <a href="../../../org/dom4j/io/XMLWriter.html#setResolveEntityRefs(boolean)">setResolveEntityRefs</a>, <a href="../../../org/dom4j/io/XMLWriter.html#setWriter(java.io.Writer)">setWriter</a>, <a href="../../../org/dom4j/io/XMLWriter.html#shouldEncodeChar(char)">shouldEncodeChar</a>, <a href="../../../org/dom4j/io/XMLWriter.html#startDocument()">startDocument</a>, <a href="../../../org/dom4j/io/XMLWriter.html#startDTD(java.lang.String,%20java.lang.String,%20java.lang.String)">startDTD</a>, <a href="../../../org/dom4j/io/XMLWriter.html#startElement(java.lang.String,%20java.lang.String,%20java.lang.String,%20org.xml.sax.Attributes)">startElement</a>, <a href="../../../org/dom4j/io/XMLWriter.html#startEntity(java.lang.String)">startEntity</a>, <a href="../../../org/dom4j/io/XMLWriter.html#startPrefixMapping(java.lang.String,%20java.lang.String)">startPrefixMapping</a>, <a href="../../../org/dom4j/io/XMLWriter.html#unparsedEntityDecl(java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String)">unparsedEntityDecl</a>, <a href="../../../org/dom4j/io/XMLWriter.html#write(org.dom4j.Attribute)">write</a>, <a href="../../../org/dom4j/io/XMLWriter.html#write(org.dom4j.CDATA)">write</a>, <a href="../../../org/dom4j/io/XMLWriter.html#write(org.dom4j.Comment)">write</a>, <a href="../../../org/dom4j/io/XMLWriter.html#write(org.dom4j.Document)">write</a>, <a href="../../../org/dom4j/io/XMLWriter.html#write(org.dom4j.DocumentType)">write</a>, <a href="../../../org/dom4j/io/XMLWriter.html#write(org.dom4j.Element)">write</a>, <a href="../../../org/dom4j/io/XMLWriter.html#write(org.dom4j.Entity)">write</a>, <a href="../../../org/dom4j/io/XMLWriter.html#write(org.dom4j.Namespace)">write</a>, <a href="../../../org/dom4j/io/XMLWriter.html#write(org.dom4j.Node)">write</a>, <a href="../../../org/dom4j/io/XMLWriter.html#write(java.lang.Object)">write</a>, <a href="../../../org/dom4j/io/XMLWriter.html#write(org.dom4j.ProcessingInstruction)">write</a>, <a href="../../../org/dom4j/io/XMLWriter.html#write(java.lang.String)">write</a>, <a href="../../../org/dom4j/io/XMLWriter.html#write(org.dom4j.Text)">write</a>, <a href="../../../org/dom4j/io/XMLWriter.html#writeAttribute(org.dom4j.Attribute)">writeAttribute</a>, <a href="../../../org/dom4j/io/XMLWriter.html#writeAttribute(org.xml.sax.Attributes,%20int)">writeAttribute</a>, <a href="../../../org/dom4j/io/XMLWriter.html#writeAttributes(org.xml.sax.Attributes)">writeAttributes</a>, <a href="../../../org/dom4j/io/XMLWriter.html#writeAttributes(org.dom4j.Element)">writeAttributes</a>, <a href="../../../org/dom4j/io/XMLWriter.html#writeClose(org.dom4j.Element)">writeClose</a>, <a href="../../../org/dom4j/io/XMLWriter.html#writeComment(java.lang.String)">writeComment</a>, <a href="../../../org/dom4j/io/XMLWriter.html#writeDocType(org.dom4j.DocumentType)">writeDocType</a>, <a href="../../../org/dom4j/io/XMLWriter.html#writeDocType(java.lang.String,%20java.lang.String,%20java.lang.String)">writeDocType</a>, <a href="../../../org/dom4j/io/XMLWriter.html#writeElementContent(org.dom4j.Element)">writeElementContent</a>, <a href="../../../org/dom4j/io/XMLWriter.html#writeEntityRef(java.lang.String)">writeEntityRef</a>, <a href="../../../org/dom4j/io/XMLWriter.html#writeEscapeAttributeEntities(java.lang.String)">writeEscapeAttributeEntities</a>, <a href="../../../org/dom4j/io/XMLWriter.html#writeNamespace(org.dom4j.Namespace)">writeNamespace</a>, <a href="../../../org/dom4j/io/XMLWriter.html#writeNamespace(java.lang.String,%20java.lang.String)">writeNamespace</a>, <a href="../../../org/dom4j/io/XMLWriter.html#writeNamespaces()">writeNamespaces</a>, <a href="../../../org/dom4j/io/XMLWriter.html#writeNode(org.dom4j.Node)">writeNode</a>, <a href="../../../org/dom4j/io/XMLWriter.html#writeNodeText(org.dom4j.Node)">writeNodeText</a>, <a href="../../../org/dom4j/io/XMLWriter.html#writeOpen(org.dom4j.Element)">writeOpen</a>, <a href="../../../org/dom4j/io/XMLWriter.html#writePrintln()">writePrintln</a>, <a href="../../../org/dom4j/io/XMLWriter.html#writeProcessingInstruction(org.dom4j.ProcessingInstruction)">writeProcessingInstruction</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_org.xml.sax.helpers.XMLFilterImpl">
<!-- -->
</a>
<h3>Methods inherited from class org.xml.sax.helpers.XMLFilterImpl</h3>
<code>error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, parse, resolveEntity, setContentHandler, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setParent, skippedEntity, warning</code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="DEFAULT_PREFORMATTED_TAGS">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_PREFORMATTED_TAGS</h4>
<pre>protected static final java.util.HashSet DEFAULT_PREFORMATTED_TAGS</pre>
</li>
</ul>
<a name="DEFAULT_HTML_FORMAT">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DEFAULT_HTML_FORMAT</h4>
<pre>protected static final <a href="../../../org/dom4j/io/OutputFormat.html" title="class in org.dom4j.io">OutputFormat</a> DEFAULT_HTML_FORMAT</pre>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="HTMLWriter(java.io.Writer)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>HTMLWriter</h4>
<pre>public HTMLWriter(java.io.Writer writer)</pre>
</li>
</ul>
<a name="HTMLWriter(java.io.Writer, org.dom4j.io.OutputFormat)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>HTMLWriter</h4>
<pre>public HTMLWriter(java.io.Writer writer,
<a href="../../../org/dom4j/io/OutputFormat.html" title="class in org.dom4j.io">OutputFormat</a> format)</pre>
</li>
</ul>
<a name="HTMLWriter()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>HTMLWriter</h4>
<pre>public HTMLWriter()
throws java.io.UnsupportedEncodingException</pre>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.UnsupportedEncodingException</code></dd></dl>
</li>
</ul>
<a name="HTMLWriter(org.dom4j.io.OutputFormat)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>HTMLWriter</h4>
<pre>public HTMLWriter(<a href="../../../org/dom4j/io/OutputFormat.html" title="class in org.dom4j.io">OutputFormat</a> format)
throws java.io.UnsupportedEncodingException</pre>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.UnsupportedEncodingException</code></dd></dl>
</li>
</ul>
<a name="HTMLWriter(java.io.OutputStream)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>HTMLWriter</h4>
<pre>public HTMLWriter(java.io.OutputStream out)
throws java.io.UnsupportedEncodingException</pre>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.UnsupportedEncodingException</code></dd></dl>
</li>
</ul>
<a name="HTMLWriter(java.io.OutputStream, org.dom4j.io.OutputFormat)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>HTMLWriter</h4>
<pre>public HTMLWriter(java.io.OutputStream out,
<a href="../../../org/dom4j/io/OutputFormat.html" title="class in org.dom4j.io">OutputFormat</a> format)
throws java.io.UnsupportedEncodingException</pre>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.UnsupportedEncodingException</code></dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="isEnabled()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isEnabled</h4>
<pre>public boolean isEnabled()</pre>
</li>
</ul>
<a name="setEnabled(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setEnabled</h4>
<pre>public void setEnabled(boolean enabled)</pre>
<div class="block">Enable/disable HTML handling. If set to false, behave as plain XMLWriter
(useful if Content-Type is set to something other than text/html).</div>
</li>
</ul>
<a name="startCDATA()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>startCDATA</h4>
<pre>public void startCDATA()
throws org.xml.sax.SAXException</pre>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code>startCDATA</code> in interface <code>org.xml.sax.ext.LexicalHandler</code></dd>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../org/dom4j/io/XMLWriter.html#startCDATA()">startCDATA</a></code> in class <code><a href="../../../org/dom4j/io/XMLWriter.html" title="class in org.dom4j.io">XMLWriter</a></code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>org.xml.sax.SAXException</code></dd></dl>
</li>
</ul>
<a name="endCDATA()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>endCDATA</h4>
<pre>public void endCDATA()
throws org.xml.sax.SAXException</pre>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code>endCDATA</code> in interface <code>org.xml.sax.ext.LexicalHandler</code></dd>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../org/dom4j/io/XMLWriter.html#endCDATA()">endCDATA</a></code> in class <code><a href="../../../org/dom4j/io/XMLWriter.html" title="class in org.dom4j.io">XMLWriter</a></code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>org.xml.sax.SAXException</code></dd></dl>
</li>
</ul>
<a name="writeCDATA(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeCDATA</h4>
<pre>protected void writeCDATA(java.lang.String text)
throws java.io.IOException</pre>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../org/dom4j/io/XMLWriter.html#writeCDATA(java.lang.String)">writeCDATA</a></code> in class <code><a href="../../../org/dom4j/io/XMLWriter.html" title="class in org.dom4j.io">XMLWriter</a></code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd></dl>
</li>
</ul>
<a name="writeEntity(org.dom4j.Entity)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeEntity</h4>
<pre>protected void writeEntity(<a href="../../../org/dom4j/Entity.html" title="interface in org.dom4j">Entity</a> entity)
throws java.io.IOException</pre>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../org/dom4j/io/XMLWriter.html#writeEntity(org.dom4j.Entity)">writeEntity</a></code> in class <code><a href="../../../org/dom4j/io/XMLWriter.html" title="class in org.dom4j.io">XMLWriter</a></code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd></dl>
</li>
</ul>
<a name="writeDeclaration()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeDeclaration</h4>
<pre>protected void writeDeclaration()
throws java.io.IOException</pre>
<div class="block"><strong>Description copied from class: <code><a href="../../../org/dom4j/io/XMLWriter.html#writeDeclaration()">XMLWriter</a></code></strong></div>
<div class="block"><p>
This will write the declaration to the given Writer. Assumes XML version
1.0 since we don't directly know.
</p></div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../org/dom4j/io/XMLWriter.html#writeDeclaration()">writeDeclaration</a></code> in class <code><a href="../../../org/dom4j/io/XMLWriter.html" title="class in org.dom4j.io">XMLWriter</a></code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code> - DOCUMENT ME!</dd></dl>
</li>
</ul>
<a name="writeString(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeString</h4>
<pre>protected void writeString(java.lang.String text)
throws java.io.IOException</pre>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../org/dom4j/io/XMLWriter.html#writeString(java.lang.String)">writeString</a></code> in class <code><a href="../../../org/dom4j/io/XMLWriter.html" title="class in org.dom4j.io">XMLWriter</a></code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd></dl>
</li>
</ul>
<a name="writeClose(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeClose</h4>
<pre>protected void writeClose(java.lang.String qualifiedName)
throws java.io.IOException</pre>
<div class="block">Overriden method to not close certain element names to avoid wierd
behaviour from browsers for versions up to 5.x</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../org/dom4j/io/XMLWriter.html#writeClose(java.lang.String)">writeClose</a></code> in class <code><a href="../../../org/dom4j/io/XMLWriter.html" title="class in org.dom4j.io">XMLWriter</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>qualifiedName</code> - DOCUMENT ME!</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code> - DOCUMENT ME!</dd></dl>
</li>
</ul>
<a name="writeEmptyElementClose(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeEmptyElementClose</h4>
<pre>protected void writeEmptyElementClose(java.lang.String qualifiedName)
throws java.io.IOException</pre>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../org/dom4j/io/XMLWriter.html#writeEmptyElementClose(java.lang.String)">writeEmptyElementClose</a></code> in class <code><a href="../../../org/dom4j/io/XMLWriter.html" title="class in org.dom4j.io">XMLWriter</a></code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd></dl>
</li>
</ul>
<a name="omitElementClose(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>omitElementClose</h4>
<pre>protected boolean omitElementClose(java.lang.String qualifiedName)</pre>
</li>
</ul>
<a name="loadOmitElementCloseSet(java.util.Set)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>loadOmitElementCloseSet</h4>
<pre>protected void loadOmitElementCloseSet(java.util.Set set)</pre>
</li>
</ul>
<a name="getOmitElementCloseSet()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getOmitElementCloseSet</h4>
<pre>public java.util.Set getOmitElementCloseSet()</pre>
<div class="block">A clone of the Set of elements that can have their close-tags omitted. By
default it should be "AREA", "BASE", "BR", "COL", "HR", "IMG", "INPUT",
"LINK", "META", "PARAM"</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>A clone of the Set.</dd></dl>
</li>
</ul>
<a name="setOmitElementCloseSet(java.util.Set)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setOmitElementCloseSet</h4>
<pre>public void setOmitElementCloseSet(java.util.Set newSet)</pre>
<div class="block">To use the empty set, pass an empty Set, or null:
<pre>
setOmitElementCloseSet(new HashSet());
or
setOmitElementCloseSet(null);
</pre></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>newSet</code> - DOCUMENT ME!</dd></dl>
</li>
</ul>
<a name="getPreformattedTags()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPreformattedTags</h4>
<pre>public java.util.Set getPreformattedTags()</pre>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../org/dom4j/io/HTMLWriter.html#setPreformattedTags(java.util.Set)"><code>setPreformattedTags</code></a></dd></dl>
</li>
</ul>
<a name="setPreformattedTags(java.util.Set)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setPreformattedTags</h4>
<pre>public void setPreformattedTags(java.util.Set newSet)</pre>
<div class="block"><p>
Override the default set, which includes PRE, SCRIPT, STYLE, and
TEXTAREA, case insensitively.
</p>
<p>
<b>Setting Preformatted Tags </b>
</p>
<p>
Pass in a Set of Strings, one for each tag name that should be treated
like a PRE tag. You may pass in null or an empty Set to assign the empty
set, in which case no tags will be treated as preformatted, except that
HTML Comments will continue to be preformatted. If a tag is included in
the set of preformatted tags, all whitespace within the tag will be
preserved, including whitespace on the same line preceding the close tag.
This will generally make the close tag not line up with the start tag,
but it preserves the intention of the whitespace within the tag.
</p>
<p>
The browser considers leading whitespace before the close tag to be
significant, but leading whitespace before the open tag to be
insignificant. For example, if the HTML author doesn't put the close
TEXTAREA tag flush to the left margin, then the TEXTAREA control in the
browser will have spaces on the last line inside the control. This may be
the HTML author's intent. Similarly, in a PRE, the browser treats a
flushed left close PRE tag as different from a close tag with leading
whitespace. Again, this must be left up to the HTML author.
</p>
<p>
<b>Examples </b>
</p>
<blockquote>
<p>
Here is an example of how you can set the PreformattedTags list using
setPreformattedTags to include IFRAME, as well as the default set, if you
have an instance of this class named myHTMLWriter:
<pre>
Set current = myHTMLWriter.getPreformattedTags();
current.add("IFRAME");
myHTMLWriter.setPreformattedTags(current);
//The set is now <b>PRE, SCRIPT, STYLE, TEXTAREA, IFRAME</b>
</pre>
Similarly, you can simply replace it with your own:
<pre>
HashSet newset = new HashSet();
newset.add("PRE");
newset.add("TEXTAREA");
myHTMLWriter.setPreformattedTags(newset);
//The set is now <b>{PRE, TEXTAREA}</b>
</pre>
You can remove all tags from the preformatted tags list, with an empty
set, like this:
<pre>
myHTMLWriter.setPreformattedTags(new HashSet());
//The set is now <b>{}</b>
</pre>
or with null, like this:
<pre>
myHTMLWriter.setPreformattedTags(null);
//The set is now <b>{}</b>
</pre>
</p>
</blockquote></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>newSet</code> - DOCUMENT ME!</dd></dl>
</li>
</ul>
<a name="isPreformattedTag(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isPreformattedTag</h4>
<pre>public boolean isPreformattedTag(java.lang.String qualifiedName)</pre>
<div class="block">DOCUMENT ME!</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>qualifiedName</code> - DOCUMENT ME!</dd>
<dt><span class="strong">Returns:</span></dt><dd>true if the qualifiedName passed in matched (case-insensitively)
a tag in the preformattedTags set, or false if not found or if
the set is empty or null.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../org/dom4j/io/HTMLWriter.html#setPreformattedTags(java.util.Set)"><code>setPreformattedTags</code></a></dd></dl>
</li>
</ul>
<a name="writeElement(org.dom4j.Element)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeElement</h4>
<pre>protected void writeElement(<a href="../../../org/dom4j/Element.html" title="interface in org.dom4j">Element</a> element)
throws java.io.IOException</pre>
<div class="block">This override handles any elements that should not remove whitespace,
such as <PRE>, <SCRIPT>, <STYLE>, and <TEXTAREA>.
Note: the close tags won't line up with the open tag, but we can't alter
that. See javadoc note at setPreformattedTags.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../org/dom4j/io/XMLWriter.html#writeElement(org.dom4j.Element)">writeElement</a></code> in class <code><a href="../../../org/dom4j/io/XMLWriter.html" title="class in org.dom4j.io">XMLWriter</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>element</code> - DOCUMENT ME!</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code> - When the stream could not be written to.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../org/dom4j/io/HTMLWriter.html#setPreformattedTags(java.util.Set)"><code>setPreformattedTags</code></a></dd></dl>
</li>
</ul>
<a name="prettyPrintHTML(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>prettyPrintHTML</h4>
<pre>public static java.lang.String prettyPrintHTML(java.lang.String html)
throws java.io.IOException,
java.io.UnsupportedEncodingException,
<a href="../../../org/dom4j/DocumentException.html" title="class in org.dom4j">DocumentException</a></pre>
<div class="block">Convenience method to just get a String result.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>html</code> - DOCUMENT ME!</dd>
<dt><span class="strong">Returns:</span></dt><dd>a pretty printed String from the source string, preserving
whitespace in the defaultPreformattedTags set, and leaving the
close tags off of the default omitElementCloseSet set. Use one of
the write methods if you want stream output.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd>
<dd><code>java.io.UnsupportedEncodingException</code></dd>
<dd><code><a href="../../../org/dom4j/DocumentException.html" title="class in org.dom4j">DocumentException</a></code></dd></dl>
</li>
</ul>
<a name="prettyPrintXHTML(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>prettyPrintXHTML</h4>
<pre>public static java.lang.String prettyPrintXHTML(java.lang.String html)
throws java.io.IOException,
java.io.UnsupportedEncodingException,
<a href="../../../org/dom4j/DocumentException.html" title="class in org.dom4j">DocumentException</a></pre>
<div class="block">Convenience method to just get a String result, but <b>As XHTML </b>.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>html</code> - DOCUMENT ME!</dd>
<dt><span class="strong">Returns:</span></dt><dd>a pretty printed String from the source string, preserving
whitespace in the defaultPreformattedTags set, but conforming to
XHTML: no close tags are omitted (though if empty, they will be
converted to XHTML empty tags: <HR/> Use one of the write
methods if you want stream output.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd>
<dd><code>java.io.UnsupportedEncodingException</code></dd>
<dd><code><a href="../../../org/dom4j/DocumentException.html" title="class in org.dom4j">DocumentException</a></code></dd></dl>
</li>
</ul>
<a name="prettyPrintHTML(java.lang.String, boolean, boolean, boolean, boolean)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>prettyPrintHTML</h4>
<pre>public static java.lang.String prettyPrintHTML(java.lang.String html,
boolean newlines,
boolean trim,
boolean isXHTML,
boolean expandEmpty)
throws java.io.IOException,
java.io.UnsupportedEncodingException,
<a href="../../../org/dom4j/DocumentException.html" title="class in org.dom4j">DocumentException</a></pre>
<div class="block">DOCUMENT ME!</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>html</code> - DOCUMENT ME!</dd><dd><code>newlines</code> - DOCUMENT ME!</dd><dd><code>trim</code> - DOCUMENT ME!</dd><dd><code>isXHTML</code> - DOCUMENT ME!</dd><dd><code>expandEmpty</code> - DOCUMENT ME!</dd>
<dt><span class="strong">Returns:</span></dt><dd>a pretty printed String from the source string, preserving
whitespace in the defaultPreformattedTags set, and leaving the
close tags off of the default omitElementCloseSet set. This
override allows you to specify various formatter options. Use one
of the write methods if you want stream output.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd>
<dd><code>java.io.UnsupportedEncodingException</code></dd>
<dd><code><a href="../../../org/dom4j/DocumentException.html" title="class in org.dom4j">DocumentException</a></code></dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/HTMLWriter.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../org/dom4j/io/ElementModifier.html" title="interface in org.dom4j.io"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../org/dom4j/io/OutputFormat.html" title="class in org.dom4j.io"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?org/dom4j/io/HTMLWriter.html" target="_top">Frames</a></li>
<li><a href="HTMLWriter.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li><a href="#field_summary">Field</a> | </li>
<li><a href="#constructor_summary">Constr</a> | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li><a href="#field_detail">Field</a> | </li>
<li><a href="#constructor_detail">Constr</a> | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright ? 2005 MetaStuff Ltd. All Rights Reserved. Hosted by <p> <img src='http://sourceforge.net/sflogo.php?group_id=16035' width='88' height='31' border='0' alt='SourceForge Logo' /></small></p>
</body>
</html>
|