Java Doc for InverseSax.java in  » Science » Cougaar12_4 » org » cougaar » lib » aggagent » util » 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 » Science » Cougaar12_4 » org.cougaar.lib.aggagent.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.cougaar.lib.aggagent.util.InverseSax

InverseSax
public class InverseSax (Code)
InverseSax is a class that acts as the reverse of a SAX parser. In other words, it creates the text of an XML document by accepting notification of parts of the XML structure through method calls. Those parts include opening and closing tags, attributes, and text. In the attributes and text, encoding of special characters is handled automatically.




Method Summary
public  voidaddAttribute(String name, String value)
     Add an attribute to the current XML element.
public  voidaddElement(String tag)
     Add a new element to the document.
public  voidaddEltAtt(String tag, String att, String val)
     Convenience method for adding an element with a single attribute and no content.
public  voidaddEltAttText(String tag, String att, String val, String text)
     Convenience method for adding an element with a single attribute and text for content.
public  voidaddText(String text)
     Add text content to the current XML element.
public  voidaddTextElement(String tag, String text)
     Convenience method for adding an element with text but no attributes or child elements.
public  voidendDocument()
     This method probably shouldn't be used under normal conditions.
public  voidendElement()
     Close the current element.
public static  voidmain(String[] argv)
    
public  voidreset()
     Return this XML document generator to its pristine state, abandoning any work previously in progress.
public  voidsetLenientMode(boolean b)
     Set the lenient mode on or off.
public  voidsetPrettyPrintMode(boolean b)
    
public  StringtoString()
     Return the text of the XML document.



Method Detail
addAttribute
public void addAttribute(String name, String value)(Code)
Add an attribute to the current XML element. This method is only valid after creating an element and before adding other contents, such as text or child elements. Use of this method at any other time will raise an IllegalStateException. Special characters within the attribute value are automatically replaced with the appropriate character entities. This method also verifies that the tag name is valid (see above).



addElement
public void addElement(String tag)(Code)
Add a new element to the document. This can be the document root or a child of another element. After the root element has been closed, no more elements may be added, and attempting to do so will result in an IllegalStateException. This method also verifies that the tag name is valid (see above).



addEltAtt
public void addEltAtt(String tag, String att, String val)(Code)
Convenience method for adding an element with a single attribute and no content.



addEltAttText
public void addEltAttText(String tag, String att, String val, String text)(Code)
Convenience method for adding an element with a single attribute and text for content. Specify null for no content.



addText
public void addText(String text)(Code)
Add text content to the current XML element. This method is valid any time after the root element is opened but before it is closed. This method may be called multiple times within a single element, but the effect is the same as calling it once with the concatenation of the text of the many calls (in the same order).



addTextElement
public void addTextElement(String tag, String text)(Code)
Convenience method for adding an element with text but no attributes or child elements.



endDocument
public void endDocument()(Code)
This method probably shouldn't be used under normal conditions. However, in case an error or some other unexpected condition is encountered while creating the XML document, this method can be used to end the document gracefully. Following any call to this method, toString() is guaranteed to return either the text of a well-formed XML document or the empty String (and the latter only if no elements were added).

After this method is called, no more content may be added, even if the document is empty.



endElement
public void endElement()(Code)
Close the current element. Every tag must be closed explicitly by a call to this method (or endDocument, which calls this method).



main
public static void main(String[] argv)(Code)



reset
public void reset()(Code)
Return this XML document generator to its pristine state, abandoning any work previously in progress.



setLenientMode
public void setLenientMode(boolean b)(Code)
Set the lenient mode on or off. In lenient mode, the tag and attribute names are not checked for invalid characters. This class accepts only the Latin alphabet (upper- and lower-case) as letters and {0, 1, ..., 9} as digits, and it does not allow the colon (used in XML namespaces). There are many other sets of letters, digits, and punctuation characters in the UNICODE spec that are allowed by standard XML. To use these characters or XML namespaces, lenient mode must be turned on.

Use at your own risk.



setPrettyPrintMode
public void setPrettyPrintMode(boolean b)(Code)
turn pretty-printing on or off



toString
public String toString()(Code)
Return the text of the XML document.



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.