Java Doc for XMLDocument.java in  » Web-Framework » JAT » com » jat » util » 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 » Web Framework » JAT » com.jat.util.xml 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.jat.util.xml.XMLDocument

XMLDocument
public class XMLDocument implements ErrorHandler,ErrorListener(Code)

Title: JAT

Description: This class is an utility to manage XML document in cogiumtion with XMLUtil class
It permits to:




Constructor Summary
public  XMLDocument()
    
public  XMLDocument(boolean coalescing)
    
public  XMLDocument(Document doc)
    
public  XMLDocument(Document doc, boolean coalescing)
    

Method Summary
protected synchronized  voidconvertCDataToText()
    
public  voiderror(SAXParseException ex)
    
public  voiderror(TransformerException ex)
    
public  ArrayListevaluateXPath(String xPath)
     Evaluate an XPath expression.
public  voidfatalError(SAXParseException ex)
    
public  voidfatalError(TransformerException ex)
    
public  VectorgetAllAttributeNode()
    
public  VectorgetAllCDataSectionNode()
    
public  VectorgetAllCommentNode()
    
public  VectorgetAllDocumentFragmentNode()
    
public  VectorgetAllEntityNode()
    
public  VectorgetAllNodes(short type)
    
public  VectorgetAllNotationNode()
    
public  VectorgetAllProcessingInstructionNode()
    
public  VectorgetAllStyleSheetProcessingInstructionNode()
    
public  VectorgetAllTextNode()
    
public  DocumentgetDocument()
    
public  ElementgetElementNode()
    
protected static  XMLDocumentgetInstance(InputSource is, boolean validate, boolean coalescing)
    
public  booleanisCoalescing()
    
public  voidprintXPath(String xpath)
    
public  voidsaveToFile(String filename)
    
protected  voidsetCoalescing(boolean coalescing)
    
protected  voidsetDocument(Document doc)
    
public  StringtoString()
    
public  StringWritertransform()
    
public  StringWritertransform(String styleFilename)
    
public  StringWritertransform(File styleFile)
    
public  StringWritertransform(StreamSource styleSource)
    
public  voidwarning(SAXParseException ex)
    
public  voidwarning(TransformerException ex)
    


Constructor Detail
XMLDocument
public XMLDocument()(Code)
Constructor



XMLDocument
public XMLDocument(boolean coalescing)(Code)
Constructor
Parameters:
  coalescing - if true CDataSection will be repleaced by Text Node



XMLDocument
public XMLDocument(Document doc)(Code)
Constructor
Parameters:
  doc - DOM object



XMLDocument
public XMLDocument(Document doc, boolean coalescing)(Code)
Constructor
Parameters:
  doc - DOM object
Parameters:
  coalescing - if true CDataSection will be repleaced by TextNode




Method Detail
convertCDataToText
protected synchronized void convertCDataToText()(Code)
convert all CDataSection node into Text node



error
public void error(SAXParseException ex) throws SAXException(Code)
Callback method used by XML parser to set error message
Parameters:
  exception - the error message
throws:
  SAXException -



error
public void error(TransformerException ex) throws TransformerException(Code)
Callback method used by XML parser to set error message
Parameters:
  exception - the error message
throws:
  SAXException -



evaluateXPath
public ArrayList evaluateXPath(String xPath) throws TransformerException(Code)
Evaluate an XPath expression. For Example: the xml: Joe +391111 Rome XPath expression "person/name" will return 1 org.w3c.dom.Node (org.w3c.dom.TextNode) with value 'Joe' XPath expression "person" will return 3 org.w3c.dom.Node (org.w3c.dom.Element) with the follow structure: 1) Joe 2) +391111 3) Rome
Parameters:
  xPath - XPath expression to evalate An array list containing Node object(s)
exception:
  javax.xml.transform.TransformerException -



fatalError
public void fatalError(SAXParseException ex) throws SAXException(Code)
Callback method used by XML parser to set fatal error message
Parameters:
  exception - the fatal error message
throws:
  SAXException -



fatalError
public void fatalError(TransformerException ex) throws TransformerException(Code)
Callback method used by XML parser to set fatal error message
Parameters:
  exception - the fatal error message
throws:
  SAXException -



getAllAttributeNode
public Vector getAllAttributeNode()(Code)
Returun all Attribute node children of the Document



getAllCDataSectionNode
public Vector getAllCDataSectionNode()(Code)
Returun all DataSection node children of the Document



getAllCommentNode
public Vector getAllCommentNode()(Code)
Returun all Comment node children of the Document



getAllDocumentFragmentNode
public Vector getAllDocumentFragmentNode()(Code)
Returun all DocumentFragment children node of the Document



getAllEntityNode
public Vector getAllEntityNode()(Code)
Returun all Entity node children of the Document



getAllNodes
public Vector getAllNodes(short type)(Code)
Returun all Node children of the Document with the type 'type'
Parameters:
  type - Node type



getAllNotationNode
public Vector getAllNotationNode()(Code)
Returun all Notation node children of the Document



getAllProcessingInstructionNode
public Vector getAllProcessingInstructionNode()(Code)
Returun all ProcessInstruction children node of the Document



getAllStyleSheetProcessingInstructionNode
public Vector getAllStyleSheetProcessingInstructionNode()(Code)
return all stylesheet process instruction of the XML document



getAllTextNode
public Vector getAllTextNode()(Code)
Returun all Text node children of the Document



getDocument
public Document getDocument()(Code)
return the XML Document



getElementNode
public Element getElementNode()(Code)
Returun the Element node children of the Document



getInstance
protected static XMLDocument getInstance(InputSource is, boolean validate, boolean coalescing) throws IOException, ParserConfigurationException, SAXException(Code)
return a XMLDocument istance
Parameters:
  is - XML input source
Parameters:
  validate - if true the XML will be validated by its own DTD or Schema
Parameters:
  coalescing - if true CDataSection will be repleaced by Text Node
exception:
  java.io.IOException -
exception:
  javax.xml.parsers.ParserConfigurationException -
exception:
  org.xml.sax.SAXException -



isCoalescing
public boolean isCoalescing()(Code)
return true if CDataSection will be (or has been) repleaced by Text Node



printXPath
public void printXPath(String xpath) throws Exception(Code)
print XPath result into standard output
Parameters:
  xpath - XPath expression
exception:
  java.lang.Exception -



saveToFile
public void saveToFile(String filename) throws IOException(Code)
Save XML to file
Parameters:
  filename - The name of the file
exception:
  java.io.IOException -



setCoalescing
protected void setCoalescing(boolean coalescing)(Code)
if true CDataSection will be repleaced by Text Node
Parameters:
  coalescing -



setDocument
protected void setDocument(Document doc)(Code)
set the XML Document
Parameters:
  doc -



toString
public String toString()(Code)
return the String representing the Document in XML format



transform
public StringWriter transform() throws TransformerConfigurationException, TransformerException(Code)
performs a XSLT transform by the stylesheet into the XML document (if exist) throws a Trasformer Exception if the stylesheet does not exist
exception:
  javax.xml.transform.TransformerConfigurationException -
exception:
  javax.xml.transform.TransformerException -



transform
public StringWriter transform(String styleFilename) throws TransformerConfigurationException, TransformerException(Code)
performs a XSLT transform by the stylesheet specified in styleFilename
Parameters:
  styleFilename - the name of the stylesheet file
exception:
  javax.xml.transform.TransformerConfigurationException -
exception:
  javax.xml.transform.TransformerException -



transform
public StringWriter transform(File styleFile) throws TransformerConfigurationException, TransformerException(Code)
performs a XSLT transform by the stylesheet specified in styleFile
Parameters:
  styleFile - the file rapresenting the stylesheet
exception:
  javax.xml.transform.TransformerConfigurationException -
exception:
  javax.xml.transform.TransformerException -



transform
public StringWriter transform(StreamSource styleSource) throws TransformerConfigurationException, TransformerException(Code)
performs a XSLT transform by the stylesheet specified in styleSource
Parameters:
  styleSource - the stream rapresenting the stylesheet
exception:
  javax.xml.transform.TransformerConfigurationException -
exception:
  javax.xml.transform.TransformerException -



warning
public void warning(SAXParseException ex) throws SAXException(Code)
Callback method used by XML parser to set error message
Parameters:
  exception - the error message
throws:
  SAXException -



warning
public void warning(TransformerException ex) throws TransformerException(Code)
Callback method used by XML parser to set error message
Parameters:
  exception - the error message
throws:
  SAXException -



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.