blob: e6bc7bec9bd5fd793c00a4a689c62810ca4f553b [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>XmlOutput (Apache Calcite API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
<script type="text/javascript" src="../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../jquery/jquery-3.3.1.js"></script>
<script type="text/javascript" src="../../../../jquery/jquery-migrate-3.0.1.js"></script>
<script type="text/javascript" src="../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="XmlOutput (Apache Calcite API)";
}
}
catch(err) {
}
//-->
var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":9,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":9,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":9,"i25":9,"i26":10};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../";
var useModuleDirectories = true;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/XmlOutput.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-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</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>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">org.apache.calcite.util</a></div>
<h2 title="Class XmlOutput" class="title">Class XmlOutput</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.apache.calcite.util.XmlOutput</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<pre>public class <span class="typeNameLabel">XmlOutput</span>
extends java.lang.Object</pre>
<div class="block">Streaming XML output.
<p>Use this class to write XML to any streaming source.
While the class itself is unstructured and doesn't enforce any DTD
specification, use of the class
does ensure that the output is syntactically valid XML.</p></div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Class</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>(package private) static class&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="XmlOutput.StringEscaper.html" title="class in org.apache.calcite.util">XmlOutput.StringEscaper</a></span></code></th>
<td class="colLast">
<div class="block">Utility for replacing special characters
with escape sequences in strings.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>(package private) static class&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="XmlOutput.XMLAttrVector.html" title="class in org.apache.calcite.util">XmlOutput.XMLAttrVector</a></span></code></th>
<td class="colLast">
<div class="block">List of attribute names and values.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- =========== FIELD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Field</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#alwaysQuoteCData">alwaysQuoteCData</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#compact">compact</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#glob">glob</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ignorePcdata">ignorePcdata</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#indent">indent</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#indentString">indentString</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#inTag">inTag</a></span></code></th>
<td class="colLast">
<div class="block">Whether we have started but not finished a start tag.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private java.io.PrintWriter</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#out">out</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private java.util.Deque&lt;java.lang.String&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#tagStack">tagStack</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#tagsWritten">tagsWritten</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(java.io.PrintWriter)">XmlOutput</a></span>&#8203;(java.io.PrintWriter&nbsp;out)</code></th>
<td class="colLast">
<div class="block">Constructs a new XmlOutput based on a <code>PrintWriter</code>.</div>
</td>
</tr>
<tr class="rowColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(java.io.Writer)">XmlOutput</a></span>&#8203;(java.io.Writer&nbsp;out)</code></th>
<td class="colLast">
<div class="block">Constructs a new XmlOutput based on any <code>Writer</code>.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#attribute(java.lang.String,java.lang.String)">attribute</a></span>&#8203;(java.lang.String&nbsp;name,
java.lang.String&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Writes an attribute.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#beginBeginTag(java.lang.String)">beginBeginTag</a></span>&#8203;(java.lang.String&nbsp;tagName)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#beginNode()">beginNode</a></span>()</code></th>
<td class="colLast">
<div class="block">If we are currently inside the start tag, finishes it off.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#beginTag(java.lang.String,org.apache.calcite.util.XmlOutput.XMLAttrVector)">beginTag</a></span>&#8203;(java.lang.String&nbsp;tagName,
<a href="XmlOutput.XMLAttrVector.html" title="class in org.apache.calcite.util">XmlOutput.XMLAttrVector</a>&nbsp;attributes)</code></th>
<td class="colLast">
<div class="block">Starts writing a new tag to the stream.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#cdata(java.lang.String)">cdata</a></span>&#8203;(java.lang.String&nbsp;data)</code></th>
<td class="colLast">
<div class="block">Writes a CDATA section.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#cdata(java.lang.String,boolean)">cdata</a></span>&#8203;(java.lang.String&nbsp;data,
boolean&nbsp;quote)</code></th>
<td class="colLast">
<div class="block">Writes a CDATA section (as <a href="#cdata(java.lang.String)"><code>cdata(String)</code></a>).</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#content(java.lang.String)">content</a></span>&#8203;(java.lang.String&nbsp;content)</code></th>
<td class="colLast">
<div class="block">Writes content.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>private void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#displayIndent(java.io.PrintWriter,int)">displayIndent</a></span>&#8203;(java.io.PrintWriter&nbsp;out,
int&nbsp;indent)</code></th>
<td class="colLast">
<div class="block">Private helper function to display a degree of indentation</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#emptyTag(java.lang.String,org.apache.calcite.util.XmlOutput.XMLAttrVector)">emptyTag</a></span>&#8203;(java.lang.String&nbsp;tagName,
<a href="XmlOutput.XMLAttrVector.html" title="class in org.apache.calcite.util">XmlOutput.XMLAttrVector</a>&nbsp;attributes)</code></th>
<td class="colLast">
<div class="block">Writes an empty tag to the stream.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#endBeginTag(java.lang.String)">endBeginTag</a></span>&#8203;(java.lang.String&nbsp;tagName)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#endTag(java.lang.String)">endTag</a></span>&#8203;(java.lang.String&nbsp;tagName)</code></th>
<td class="colLast">
<div class="block">Completes a tag.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>private static java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#escapeForQuoting(java.lang.String)">escapeForQuoting</a></span>&#8203;(java.lang.String&nbsp;val)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCompact()">getCompact</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getIgnorePcdata()">getIgnorePcdata</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#header()">header</a></span>()</code></th>
<td class="colLast">
<div class="block">Write header.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#header(java.lang.String)">header</a></span>&#8203;(java.lang.String&nbsp;version)</code></th>
<td class="colLast">
<div class="block">Write header, take version as input.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#numTagsWritten()">numTagsWritten</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the total number of tags written</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#print(java.lang.String)">print</a></span>&#8203;(java.lang.String&nbsp;s)</code></th>
<td class="colLast">
<div class="block">Sends a string directly to the output stream, without escaping any
characters.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>private static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#printAtt(java.io.PrintWriter,java.lang.String,java.lang.String)">printAtt</a></span>&#8203;(java.io.PrintWriter&nbsp;pw,
java.lang.String&nbsp;name,
java.lang.String&nbsp;val)</code></th>
<td class="colLast">
<div class="block">Print an XML attribute name and value for string val</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setAlwaysQuoteCData(boolean)">setAlwaysQuoteCData</a></span>&#8203;(boolean&nbsp;alwaysQuoteCData)</code></th>
<td class="colLast">
<div class="block">Sets whether to always quote cdata segments (even if they don't contain
special characters).</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setCompact(boolean)">setCompact</a></span>&#8203;(boolean&nbsp;compact)</code></th>
<td class="colLast">
<div class="block">Sets or unsets the compact mode.</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setGlob(boolean)">setGlob</a></span>&#8203;(boolean&nbsp;glob)</code></th>
<td class="colLast">
<div class="block">Sets whether to detect that tags are empty.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setIgnorePcdata(boolean)">setIgnorePcdata</a></span>&#8203;(boolean&nbsp;ignorePcdata)</code></th>
<td class="colLast">
<div class="block">Sets whether to ignore unquoted text, such as whitespace.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setIndentString(java.lang.String)">setIndentString</a></span>&#8203;(java.lang.String&nbsp;indentString)</code></th>
<td class="colLast">
<div class="block">Sets the string to print for each level of indentation.</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>private static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#stringEncodeXML(java.lang.String,java.io.PrintWriter)">stringEncodeXML</a></span>&#8203;(java.lang.String&nbsp;input,
java.io.PrintWriter&nbsp;out)</code></th>
<td class="colLast">
<div class="block">Encode a String for XML output, displaying it to a PrintWriter.</div>
</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code>private static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#stringHasXMLSpecials(java.lang.String)">stringHasXMLSpecials</a></span>&#8203;(java.lang.String&nbsp;input)</code></th>
<td class="colLast">
<div class="block">Returns whether a string contains any XML special characters.</div>
</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#stringTag(java.lang.String,java.lang.String)">stringTag</a></span>&#8203;(java.lang.String&nbsp;name,
java.lang.String&nbsp;data)</code></th>
<td class="colLast">
<div class="block">Writes a String tag; a tag containing nothing but a CDATA section.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a id="out">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>out</h4>
<pre>private final&nbsp;java.io.PrintWriter out</pre>
</li>
</ul>
<a id="tagStack">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>tagStack</h4>
<pre>private final&nbsp;java.util.Deque&lt;java.lang.String&gt; tagStack</pre>
</li>
</ul>
<a id="indent">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>indent</h4>
<pre>private&nbsp;int indent</pre>
</li>
</ul>
<a id="tagsWritten">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>tagsWritten</h4>
<pre>private&nbsp;int tagsWritten</pre>
</li>
</ul>
<a id="compact">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>compact</h4>
<pre>private&nbsp;boolean compact</pre>
</li>
</ul>
<a id="indentString">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>indentString</h4>
<pre>private&nbsp;java.lang.String indentString</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#setIndentString(java.lang.String)"><code>setIndentString(java.lang.String)</code></a></dd>
</dl>
</li>
</ul>
<a id="glob">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>glob</h4>
<pre>private&nbsp;boolean glob</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#setGlob(boolean)"><code>setGlob(boolean)</code></a></dd>
</dl>
</li>
</ul>
<a id="inTag">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>inTag</h4>
<pre>private&nbsp;boolean inTag</pre>
<div class="block">Whether we have started but not finished a start tag. This only happens
if <code>glob</code> is true. The start tag is automatically closed
when we start a child node. If there are no child nodes, <a href="#endTag(java.lang.String)"><code>endTag(java.lang.String)</code></a>
creates an empty tag.</div>
</li>
</ul>
<a id="alwaysQuoteCData">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>alwaysQuoteCData</h4>
<pre>private&nbsp;boolean alwaysQuoteCData</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#setAlwaysQuoteCData(boolean)"><code>setAlwaysQuoteCData(boolean)</code></a></dd>
</dl>
</li>
</ul>
<a id="ignorePcdata">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>ignorePcdata</h4>
<pre>private&nbsp;boolean ignorePcdata</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#setIgnorePcdata(boolean)"><code>setIgnorePcdata(boolean)</code></a></dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a id="&lt;init&gt;(java.io.Writer)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>XmlOutput</h4>
<pre>public&nbsp;XmlOutput&#8203;(java.io.Writer&nbsp;out)</pre>
<div class="block">Constructs a new XmlOutput based on any <code>Writer</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>out</code> - the writer to which this XmlOutput generates results.</dd>
</dl>
</li>
</ul>
<a id="&lt;init&gt;(java.io.PrintWriter)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>XmlOutput</h4>
<pre>public&nbsp;XmlOutput&#8203;(java.io.PrintWriter&nbsp;out)</pre>
<div class="block">Constructs a new XmlOutput based on a <code>PrintWriter</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>out</code> - the writer to which this XmlOutput generates results.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="displayIndent(java.io.PrintWriter,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>displayIndent</h4>
<pre class="methodSignature">private&nbsp;void&nbsp;displayIndent&#8203;(java.io.PrintWriter&nbsp;out,
int&nbsp;indent)</pre>
<div class="block">Private helper function to display a degree of indentation</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>out</code> - the PrintWriter to which to display output.</dd>
<dd><code>indent</code> - the degree of indentation.</dd>
</dl>
</li>
</ul>
<a id="setCompact(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setCompact</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setCompact&#8203;(boolean&nbsp;compact)</pre>
<div class="block">Sets or unsets the compact mode. Compact mode causes the generated
XML to be free of extraneous whitespace and other unnecessary
characters.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>compact</code> - true to turn on compact mode, or false to turn it off.</dd>
</dl>
</li>
</ul>
<a id="getCompact()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCompact</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;getCompact()</pre>
</li>
</ul>
<a id="setIndentString(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setIndentString</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setIndentString&#8203;(java.lang.String&nbsp;indentString)</pre>
<div class="block">Sets the string to print for each level of indentation. The default is a
tab. The value must not be <code>null</code>. Set this to the empty
string to achieve no indentation (note that
<code><a href="#setCompact(boolean)"><code>setCompact(boolean)</code></a>(true)</code> removes indentation <em>and</em>
newlines).</div>
</li>
</ul>
<a id="setGlob(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setGlob</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setGlob&#8203;(boolean&nbsp;glob)</pre>
<div class="block">Sets whether to detect that tags are empty.</div>
</li>
</ul>
<a id="setAlwaysQuoteCData(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setAlwaysQuoteCData</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setAlwaysQuoteCData&#8203;(boolean&nbsp;alwaysQuoteCData)</pre>
<div class="block">Sets whether to always quote cdata segments (even if they don't contain
special characters).</div>
</li>
</ul>
<a id="setIgnorePcdata(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setIgnorePcdata</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setIgnorePcdata&#8203;(boolean&nbsp;ignorePcdata)</pre>
<div class="block">Sets whether to ignore unquoted text, such as whitespace.</div>
</li>
</ul>
<a id="getIgnorePcdata()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getIgnorePcdata</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;getIgnorePcdata()</pre>
</li>
</ul>
<a id="print(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>print</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;print&#8203;(java.lang.String&nbsp;s)</pre>
<div class="block">Sends a string directly to the output stream, without escaping any
characters. Use with caution!</div>
</li>
</ul>
<a id="beginTag(java.lang.String,org.apache.calcite.util.XmlOutput.XMLAttrVector)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>beginTag</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;beginTag&#8203;(java.lang.String&nbsp;tagName,
<a href="XmlOutput.XMLAttrVector.html" title="class in org.apache.calcite.util">XmlOutput.XMLAttrVector</a>&nbsp;attributes)</pre>
<div class="block">Starts writing a new tag to the stream. The tag's name must be given and
its attributes should be specified by a fully constructed AttrVector
object.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>tagName</code> - the name of the tag to write.</dd>
<dd><code>attributes</code> - an XMLAttrVector containing the attributes to include
in the tag.</dd>
</dl>
</li>
</ul>
<a id="beginBeginTag(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>beginBeginTag</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;beginBeginTag&#8203;(java.lang.String&nbsp;tagName)</pre>
</li>
</ul>
<a id="endBeginTag(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>endBeginTag</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;endBeginTag&#8203;(java.lang.String&nbsp;tagName)</pre>
</li>
</ul>
<a id="attribute(java.lang.String,java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>attribute</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;attribute&#8203;(java.lang.String&nbsp;name,
java.lang.String&nbsp;value)</pre>
<div class="block">Writes an attribute.</div>
</li>
</ul>
<a id="beginNode()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>beginNode</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;beginNode()</pre>
<div class="block">If we are currently inside the start tag, finishes it off.</div>
</li>
</ul>
<a id="endTag(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>endTag</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;endTag&#8203;(java.lang.String&nbsp;tagName)</pre>
<div class="block">Completes a tag. This outputs the end tag corresponding to the
last exposed beginTag. The tag name must match the name of the
corresponding beginTag.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>tagName</code> - the name of the end tag to write.</dd>
</dl>
</li>
</ul>
<a id="emptyTag(java.lang.String,org.apache.calcite.util.XmlOutput.XMLAttrVector)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>emptyTag</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;emptyTag&#8203;(java.lang.String&nbsp;tagName,
<a href="XmlOutput.XMLAttrVector.html" title="class in org.apache.calcite.util">XmlOutput.XMLAttrVector</a>&nbsp;attributes)</pre>
<div class="block">Writes an empty tag to the stream. An empty tag is one with no
tags inside it, although it may still have attributes.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>tagName</code> - the name of the empty tag.</dd>
<dd><code>attributes</code> - an XMLAttrVector containing the attributes to
include in the tag.</dd>
</dl>
</li>
</ul>
<a id="cdata(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>cdata</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;cdata&#8203;(java.lang.String&nbsp;data)</pre>
<div class="block">Writes a CDATA section. Such sections always appear on their own line.
The nature in which the CDATA section is written depends on the actual
string content with respect to these special characters/sequences:
<ul>
<li><code>&amp;</code>
<li><code>&quot;</code>
<li><code>'</code>
<li><code>&lt;</code>
<li><code>&gt;</code>
</ul>
Additionally, the sequence <code>]]&gt;</code> is special.
<ul>
<li>Content containing no special characters will be left as-is.
<li>Content containing one or more special characters but not the
sequence <code>]]&gt;</code> will be enclosed in a CDATA section.
<li>Content containing special characters AND at least one
<code>]]&gt;</code> sequence will be left as-is but have all of its
special characters encoded as entities.
</ul>
These special treatment rules are required to allow cdata sections
to contain XML strings which may themselves contain cdata sections.
Traditional CDATA sections <b>do not nest</b>.</div>
</li>
</ul>
<a id="cdata(java.lang.String,boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>cdata</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;cdata&#8203;(java.lang.String&nbsp;data,
boolean&nbsp;quote)</pre>
<div class="block">Writes a CDATA section (as <a href="#cdata(java.lang.String)"><code>cdata(String)</code></a>).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - string to write</dd>
<dd><code>quote</code> - if true, quote in a <code>&lt;![CDATA[</code>
... <code>]]&gt;</code> regardless of the content of
<code>data</code>; if false, quote only if the content needs it</dd>
</dl>
</li>
</ul>
<a id="stringTag(java.lang.String,java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>stringTag</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;stringTag&#8203;(java.lang.String&nbsp;name,
java.lang.String&nbsp;data)</pre>
<div class="block">Writes a String tag; a tag containing nothing but a CDATA section.</div>
</li>
</ul>
<a id="content(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>content</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;content&#8203;(java.lang.String&nbsp;content)</pre>
<div class="block">Writes content.</div>
</li>
</ul>
<a id="header()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>header</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;header()</pre>
<div class="block">Write header. Use default version 1.0.</div>
</li>
</ul>
<a id="header(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>header</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;header&#8203;(java.lang.String&nbsp;version)</pre>
<div class="block">Write header, take version as input.</div>
</li>
</ul>
<a id="numTagsWritten()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>numTagsWritten</h4>
<pre class="methodSignature">public&nbsp;int&nbsp;numTagsWritten()</pre>
<div class="block">Get the total number of tags written</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the total number of tags written to the XML stream.</dd>
</dl>
</li>
</ul>
<a id="printAtt(java.io.PrintWriter,java.lang.String,java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>printAtt</h4>
<pre class="methodSignature">private static&nbsp;void&nbsp;printAtt&#8203;(java.io.PrintWriter&nbsp;pw,
java.lang.String&nbsp;name,
java.lang.String&nbsp;val)</pre>
<div class="block">Print an XML attribute name and value for string val</div>
</li>
</ul>
<a id="stringEncodeXML(java.lang.String,java.io.PrintWriter)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>stringEncodeXML</h4>
<pre class="methodSignature">private static&nbsp;void&nbsp;stringEncodeXML&#8203;(java.lang.String&nbsp;input,
java.io.PrintWriter&nbsp;out)</pre>
<div class="block">Encode a String for XML output, displaying it to a PrintWriter.
The String to be encoded is displayed, except that
special characters are converted into entities.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - a String to convert.</dd>
<dd><code>out</code> - a PrintWriter to which to write the results.</dd>
</dl>
</li>
</ul>
<a id="escapeForQuoting(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>escapeForQuoting</h4>
<pre class="methodSignature">private static&nbsp;java.lang.String&nbsp;escapeForQuoting&#8203;(java.lang.String&nbsp;val)</pre>
</li>
</ul>
<a id="stringHasXMLSpecials(java.lang.String)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>stringHasXMLSpecials</h4>
<pre class="methodSignature">private static&nbsp;boolean&nbsp;stringHasXMLSpecials&#8203;(java.lang.String&nbsp;input)</pre>
<div class="block">Returns whether a string contains any XML special characters.
<p>If this function returns true, the string will need to be
encoded either using the stringEncodeXML function above or using a
CDATA section. Note that MSXML has a nasty bug whereby whitespace
characters outside of a CDATA section are lost when parsing. To
avoid hitting this bug, this method treats many whitespace characters
as "special".</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - the String to scan for XML special characters.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the String contains any such characters.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/XmlOutput.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-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses.html">All&nbsp;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>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
<p class="legalCopy"><small>Copyright &#169; 2012&#x2013;2019 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</body>
</html>