Java Doc for XMLPrinter.java in  » Scripting » Kawa » gnu » xml » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Scripting » Kawa » gnu.xml 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.io.Writer
      java.io.PrintWriter
         gnu.lists.PrintConsumer
            gnu.mapping.OutPort
               gnu.xml.XMLPrinter

XMLPrinter
public class XMLPrinter extends OutPort implements PositionConsumer,XConsumer(Code)
Print an event stream in XML format on a PrintWriter.


Field Summary
final static  StringHtmlEmptyTags
    
 booleancanonicalize
    
public  booleancanonicalizeCDATA
    
final public static  ThreadLocationdoctypePublic
     The system identifier emitted in a DOCTYPE declaration.
final public static  ThreadLocationdoctypeSystem
     Fluid parameter to control whether a DOCTYPE declaration is emitted. If non-null, this is the the public identifier.
 Object[]elementNameStack
    
 intelementNesting
     Difference between number of startElement and endElement calls so far.
public  booleanescapeNonAscii
    
public  booleanescapeText
    
 booleaninAttribute
    
 intinComment
     0: not in comment; 1: in comment normal; 2: in comment after '-'.
 booleaninDocument
    
 booleaninStartTag
    
public  booleanindentAttributes
    
final public static  ThreadLocationindentLoc
    
 booleanisHtml
    
 NamespaceBindingnamespaceBindings
     Chain of currently active namespace nodes.
 NamespaceBinding[]namespaceSaveStack
     Stack of namespaceBindings as of active startElement calls.
 booleanneedXMLdecl
    
 intprev
    
public  intprintIndent
     Controls whether to add extra indentation. -1: don't add indentation; 0: pretty-print (avoid needless newlines); 1: indent (force).
 booleanprintXMLdecl
    
 charsavedHighSurrogate
    
public  booleanstrict
    
 Objectstyle
    
 booleanundeclareNamespaces
    
public  intuseEmptyElementTag
     Handling of empty elements.

Constructor Summary
public  XMLPrinter(OutPort out, boolean autoFlush)
    
public  XMLPrinter(Writer out, boolean autoFlush)
    
public  XMLPrinter(OutputStream out, boolean autoFlush)
    
public  XMLPrinter(Writer out)
    
public  XMLPrinter(OutputStream out)
    
public  XMLPrinter(OutputStream out, Path path)
    

Method Summary
public  voidbeginComment()
    
public  voidbeginEntity(Object base)
    
public  voidcloseTag()
    
public  voidconsume(SeqPosition position)
    
public  voidendAttribute()
    
public  voidendComment()
    
public  voidendDocument()
    
public  voidendElement()
    
public  voidendEntity()
    
protected  voidendNumber()
    
public  voiderror(String msg, String code)
    
public static  StringformatDecimal(BigDecimal dec)
     Format java.math.BigDecimal as needed for XPath/XQuery's xs:decimal. Specifically this means removing trailing fractional zeros, and a trailing decimal point.
static  StringformatDecimal(String str)
    
public static  StringformatDouble(double d)
     Helper to format xs:double according to XPath/XQuery specification.
public static  StringformatFloat(float f)
     Helper to format xs:float according to XPath/XQuery specification.
public  booleanignoring()
     True if consumer is ignoring rest of element. The producer can use this information to skip ahead.
public static  booleanisHtmlEmptyElementTag(String name)
    
public static  XMLPrintermake(OutPort out, Object style)
    
 booleanmustHexEscape(int v)
    
public  voidprint(Object v)
    
 voidsetIndentMode()
    
public  voidsetPrintXMLdecl(boolean value)
    
public  voidsetStyle(Object style)
    
public  voidstartAttribute(Object attrType)
     Write a attribute for the current element. This is only allowed immediately after a startElement.
public  voidstartDocument()
    
public  voidstartElement(Object type)
    
protected  voidstartNumber()
    
public static  StringtoString(Object value)
     Convert argument to string in XML syntax.
public  voidwrite(int v)
    
public  voidwrite(String str, int start, int length)
    
public  voidwrite(char[] buf, int off, int len)
    
public  voidwriteBaseUri(Object uri)
    
public  voidwriteBoolean(boolean v)
    
public  voidwriteCDATA(char[] chars, int offset, int length)
    
public  voidwriteComment(String chars)
    
public  voidwriteComment(char[] chars, int offset, int length)
    
public  voidwriteDouble(double d)
    
public  voidwriteFloat(float f)
    
public  voidwriteObject(Object v)
    
public  voidwritePosition(AbstractSequence seq, int ipos)
    
public  voidwriteProcessingInstruction(String target, char[] content, int offset, int length)
    
protected  voidwriteQName(Object name)
    

Field Detail
HtmlEmptyTags
final static String HtmlEmptyTags(Code)



canonicalize
boolean canonicalize(Code)



canonicalizeCDATA
public boolean canonicalizeCDATA(Code)



doctypePublic
final public static ThreadLocation doctypePublic(Code)
The system identifier emitted in a DOCTYPE declaration. Has no effect if doctypeSystem returns null. If non-null, this is the the system identifier.



doctypeSystem
final public static ThreadLocation doctypeSystem(Code)
Fluid parameter to control whether a DOCTYPE declaration is emitted. If non-null, this is the the public identifier.



elementNameStack
Object[] elementNameStack(Code)



elementNesting
int elementNesting(Code)
Difference between number of startElement and endElement calls so far.



escapeNonAscii
public boolean escapeNonAscii(Code)



escapeText
public boolean escapeText(Code)



inAttribute
boolean inAttribute(Code)



inComment
int inComment(Code)
0: not in comment; 1: in comment normal; 2: in comment after '-'.



inDocument
boolean inDocument(Code)



inStartTag
boolean inStartTag(Code)



indentAttributes
public boolean indentAttributes(Code)
When indentating, should attributes be lined up?



indentLoc
final public static ThreadLocation indentLoc(Code)



isHtml
boolean isHtml(Code)



namespaceBindings
NamespaceBinding namespaceBindings(Code)
Chain of currently active namespace nodes.



namespaceSaveStack
NamespaceBinding[] namespaceSaveStack(Code)
Stack of namespaceBindings as of active startElement calls.



needXMLdecl
boolean needXMLdecl(Code)



prev
int prev(Code)



printIndent
public int printIndent(Code)
Controls whether to add extra indentation. -1: don't add indentation; 0: pretty-print (avoid needless newlines); 1: indent (force).



printXMLdecl
boolean printXMLdecl(Code)



savedHighSurrogate
char savedHighSurrogate(Code)



strict
public boolean strict(Code)



style
Object style(Code)



undeclareNamespaces
boolean undeclareNamespaces(Code)



useEmptyElementTag
public int useEmptyElementTag(Code)
Handling of empty elements. 0: No element element tags, as required for canonical XML:

. 1: Use XML-style empty element tags:
2: Use HTML-compatible empty element tags:




Constructor Detail
XMLPrinter
public XMLPrinter(OutPort out, boolean autoFlush)(Code)



XMLPrinter
public XMLPrinter(Writer out, boolean autoFlush)(Code)



XMLPrinter
public XMLPrinter(OutputStream out, boolean autoFlush)(Code)



XMLPrinter
public XMLPrinter(Writer out)(Code)



XMLPrinter
public XMLPrinter(OutputStream out)(Code)



XMLPrinter
public XMLPrinter(OutputStream out, Path path)(Code)




Method Detail
beginComment
public void beginComment()(Code)



beginEntity
public void beginEntity(Object base)(Code)



closeTag
public void closeTag()(Code)



consume
public void consume(SeqPosition position)(Code)



endAttribute
public void endAttribute()(Code)



endComment
public void endComment()(Code)



endDocument
public void endDocument()(Code)



endElement
public void endElement()(Code)



endEntity
public void endEntity()(Code)



endNumber
protected void endNumber()(Code)



error
public void error(String msg, String code)(Code)



formatDecimal
public static String formatDecimal(BigDecimal dec)(Code)
Format java.math.BigDecimal as needed for XPath/XQuery's xs:decimal. Specifically this means removing trailing fractional zeros, and a trailing decimal point. However, note that the XML Schema canonical representation does require a decimal point and at least one fractional digit.



formatDecimal
static String formatDecimal(String str)(Code)



formatDouble
public static String formatDouble(double d)(Code)
Helper to format xs:double according to XPath/XQuery specification.



formatFloat
public static String formatFloat(float f)(Code)
Helper to format xs:float according to XPath/XQuery specification.



ignoring
public boolean ignoring()(Code)
True if consumer is ignoring rest of element. The producer can use this information to skip ahead.



isHtmlEmptyElementTag
public static boolean isHtmlEmptyElementTag(String name)(Code)



make
public static XMLPrinter make(OutPort out, Object style)(Code)



mustHexEscape
boolean mustHexEscape(int v)(Code)



print
public void print(Object v)(Code)



setIndentMode
void setIndentMode()(Code)



setPrintXMLdecl
public void setPrintXMLdecl(boolean value)(Code)



setStyle
public void setStyle(Object style)(Code)



startAttribute
public void startAttribute(Object attrType)(Code)
Write a attribute for the current element. This is only allowed immediately after a startElement.



startDocument
public void startDocument()(Code)



startElement
public void startElement(Object type)(Code)



startNumber
protected void startNumber()(Code)



toString
public static String toString(Object value)(Code)
Convert argument to string in XML syntax.



write
public void write(int v)(Code)



write
public void write(String str, int start, int length)(Code)



write
public void write(char[] buf, int off, int len)(Code)



writeBaseUri
public void writeBaseUri(Object uri)(Code)



writeBoolean
public void writeBoolean(boolean v)(Code)



writeCDATA
public void writeCDATA(char[] chars, int offset, int length)(Code)



writeComment
public void writeComment(String chars)(Code)



writeComment
public void writeComment(char[] chars, int offset, int length)(Code)



writeDouble
public void writeDouble(double d)(Code)



writeFloat
public void writeFloat(float f)(Code)



writeObject
public void writeObject(Object v)(Code)



writePosition
public void writePosition(AbstractSequence seq, int ipos)(Code)



writeProcessingInstruction
public void writeProcessingInstruction(String target, char[] content, int offset, int length)(Code)



writeQName
protected void writeQName(Object name)(Code)



Fields inherited from gnu.mapping.OutPort
protected PrettyWriter bout(Code)(Java Doc)
final public static ThreadLocation errLocation(Code)(Java Doc)
public AbstractFormat objectFormat(Code)(Java Doc)
final public static ThreadLocation outLocation(Code)(Java Doc)
public boolean printReadable(Code)(Java Doc)
protected Object unregisterRef(Code)(Java Doc)

Methods inherited from gnu.mapping.OutPort
public void clearBuffer()(Code)(Java Doc)
public void close()(Code)(Java Doc)
public static void closeLogFile() throws java.io.IOException(Code)(Java Doc)
protected boolean closeOnExit()(Code)(Java Doc)
public void echo(char[] buf, int off, int len) throws java.io.IOException(Code)(Java Doc)
public void endAttribute()(Code)(Java Doc)
public void endElement()(Code)(Java Doc)
public void endLogicalBlock(String suffix)(Code)(Java Doc)
public static OutPort errDefault()(Code)(Java Doc)
public void freshLine()(Code)(Java Doc)
public int getColumnNumber()(Code)(Java Doc)
final protected static boolean isWordChar(char ch)(Code)(Java Doc)
public static OutPort openFile(Object fname) throws java.io.IOException(Code)(Java Doc)
public static OutPort outDefault()(Code)(Java Doc)
public void print(int v)(Code)(Java Doc)
public void print(long v)(Code)(Java Doc)
public void print(double v)(Code)(Java Doc)
public void print(float v)(Code)(Java Doc)
public void print(String v)(Code)(Java Doc)
public void print(Object v)(Code)(Java Doc)
public void print(Consumer out)(Code)(Java Doc)
public static void runCleanups()(Code)(Java Doc)
public void setColumnNumber(int column)(Code)(Java Doc)
public static void setErrDefault(OutPort e)(Code)(Java Doc)
public void setIndentation(int amount, boolean current)(Code)(Java Doc)
public static void setLogFile(String name) throws java.io.IOException(Code)(Java Doc)
public static void setOutDefault(OutPort o)(Code)(Java Doc)
public void startAttribute(Object attrType)(Code)(Java Doc)
public void startElement(Object type)(Code)(Java Doc)
public void startLogicalBlock(String prefix, boolean perLine, String suffix)(Code)(Java Doc)
public void startLogicalBlock(String prefix, String suffix, int indent)(Code)(Java Doc)
public void writeBreak(int kind)(Code)(Java Doc)
public void writeBreakFill()(Code)(Java Doc)
public void writeBreakLinear()(Code)(Java Doc)
public void writeSpaceFill()(Code)(Java Doc)
public void writeSpaceLinear()(Code)(Java Doc)
public void writeWordEnd()(Code)(Java Doc)
public void writeWordStart()(Code)(Java Doc)

Methods inherited from gnu.lists.PrintConsumer
public void endAttribute()(Code)(Java Doc)
public void endDocument()(Code)(Java Doc)
public void endElement()(Code)(Java Doc)
protected void endNumber()(Code)(Java Doc)
public boolean ignoring()(Code)(Java Doc)
public void startAttribute(Object attrType)(Code)(Java Doc)
public void startDocument()(Code)(Java Doc)
public void startElement(Object type)(Code)(Java Doc)
protected void startNumber()(Code)(Java Doc)
public void write(CharSequence csq, int start, int end)(Code)(Java Doc)
public void writeBoolean(boolean v)(Code)(Java Doc)
public void writeDouble(double v)(Code)(Java Doc)
public void writeFloat(float v)(Code)(Java Doc)
public void writeInt(int v)(Code)(Java Doc)
public void writeLong(long v)(Code)(Java Doc)
public void writeObject(Object v)(Code)(Java Doc)

Fields inherited from java.io.PrintWriter
protected Writer out(Code)(Java Doc)

Methods inherited from java.io.PrintWriter
public PrintWriter append(CharSequence csq)(Code)(Java Doc)
public PrintWriter append(CharSequence csq, int start, int end)(Code)(Java Doc)
public PrintWriter append(char c)(Code)(Java Doc)
public boolean checkError()(Code)(Java Doc)
protected void clearError()(Code)(Java Doc)
public void close()(Code)(Java Doc)
public void flush()(Code)(Java Doc)
public PrintWriter format(String format, Object... args)(Code)(Java Doc)
public PrintWriter format(Locale l, String format, Object... args)(Code)(Java Doc)
public void print(boolean b)(Code)(Java Doc)
public void print(char c)(Code)(Java Doc)
public void print(int i)(Code)(Java Doc)
public void print(long l)(Code)(Java Doc)
public void print(float f)(Code)(Java Doc)
public void print(double d)(Code)(Java Doc)
public void print(char s)(Code)(Java Doc)
public void print(String s)(Code)(Java Doc)
public void print(Object obj)(Code)(Java Doc)
public PrintWriter printf(String format, Object... args)(Code)(Java Doc)
public PrintWriter printf(Locale l, String format, Object... args)(Code)(Java Doc)
public void println()(Code)(Java Doc)
public void println(boolean x)(Code)(Java Doc)
public void println(char x)(Code)(Java Doc)
public void println(int x)(Code)(Java Doc)
public void println(long x)(Code)(Java Doc)
public void println(float x)(Code)(Java Doc)
public void println(double x)(Code)(Java Doc)
public void println(char x)(Code)(Java Doc)
public void println(String x)(Code)(Java Doc)
public void println(Object x)(Code)(Java Doc)
protected void setError()(Code)(Java Doc)
public void write(int c)(Code)(Java Doc)
public void write(char buf, int off, int len)(Code)(Java Doc)
public void write(char buf)(Code)(Java Doc)
public void write(String s, int off, int len)(Code)(Java Doc)
public void write(String s)(Code)(Java Doc)

Fields inherited from java.io.Writer
protected Object lock(Code)(Java Doc)

Methods inherited from java.io.Writer
public Writer append(CharSequence csq) throws IOException(Code)(Java Doc)
public Writer append(CharSequence csq, int start, int end) throws IOException(Code)(Java Doc)
public Writer append(char c) throws IOException(Code)(Java Doc)
abstract public void close() throws IOException(Code)(Java Doc)
abstract public void flush() throws IOException(Code)(Java Doc)
public void write(int c) throws IOException(Code)(Java Doc)
public void write(char cbuf) throws IOException(Code)(Java Doc)
abstract public void write(char cbuf, int off, int len) throws IOException(Code)(Java Doc)
public void write(String str) throws IOException(Code)(Java Doc)
public void write(String str, int off, int len) throws IOException(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.