Java Doc for DocumentBuilder.java in  » XML » Piccolo » javax » xml » parsers » 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 » XML » Piccolo » javax.xml.parsers 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.xml.parsers.DocumentBuilder

DocumentBuilder
abstract public class DocumentBuilder (Code)
Defines the API to obtain DOM Document instances from an XML document. Using this class, an application programmer can obtain a org.w3c.dom.Document from XML.

An instance of this class can be obtained from the javax.xml.parsers.DocumentBuilderFactory.newDocumentBuilderDocumentBuilderFactory.newDocumentBuilder method. Once an instance of this class is obtained, XML can be parsed from a variety of input sources. These input sources are InputStreams, Files, URLs, and SAX InputSources.

Note that this class reuses several classes from the SAX API. This does not require that the implementor of the underlying DOM implementation use a SAX parser to parse XML document into a Document. It merely requires that the implementation communicate with the application using these existing APIs.

An implementation of DocumentBuilder is NOT guaranteed to behave as per the specification if it is used concurrently by two or more threads. It is recommended to have one instance of the DocumentBuilder per thread or it is upto the application to make sure about the use of DocumentBuilder from more than one thread.
since:
   JAXP 1.0
version:
   1.0




Constructor Summary
protected  DocumentBuilder()
    

Method Summary
abstract public  DOMImplementationgetDOMImplementation()
     Obtain an instance of a org.w3c.dom.DOMImplementation object.
abstract public  booleanisNamespaceAware()
     Indicates whether or not this parser is configured to understand namespaces.
abstract public  booleanisValidating()
     Indicates whether or not this parser is configured to validate XML documents.
abstract public  DocumentnewDocument()
     Obtain a new instance of a DOM org.w3c.dom.Document object to build a DOM tree with.
public  Documentparse(InputStream is)
     Parse the content of the given InputStream as an XML document and return a new DOM org.w3c.dom.Document object.
public  Documentparse(InputStream is, String systemId)
     Parse the content of the given InputStream as an XML document and return a new DOM org.w3c.dom.Document object.
public  Documentparse(String uri)
     Parse the content of the given URI as an XML document and return a new DOM org.w3c.dom.Document object.
public  Documentparse(File f)
     Parse the content of the given file as an XML document and return a new DOM org.w3c.dom.Document object.
abstract public  Documentparse(InputSource is)
     Parse the content of the given input source as an XML document and return a new DOM org.w3c.dom.Document object.
abstract public  voidsetEntityResolver(org.xml.sax.EntityResolver er)
     Specify the org.xml.sax.EntityResolver to be used to resolve entities present in the XML document to be parsed.
abstract public  voidsetErrorHandler(org.xml.sax.ErrorHandler eh)
     Specify the org.xml.sax.ErrorHandler to be used to report errors present in the XML document to be parsed.


Constructor Detail
DocumentBuilder
protected DocumentBuilder()(Code)




Method Detail
getDOMImplementation
abstract public DOMImplementation getDOMImplementation()(Code)
Obtain an instance of a org.w3c.dom.DOMImplementation object. A new instance of a DOMImplementation.



isNamespaceAware
abstract public boolean isNamespaceAware()(Code)
Indicates whether or not this parser is configured to understand namespaces. true if this parser is configured to understandnamespaces; false otherwise.



isValidating
abstract public boolean isValidating()(Code)
Indicates whether or not this parser is configured to validate XML documents. true if this parser is configured to validateXML documents; false otherwise.



newDocument
abstract public Document newDocument()(Code)
Obtain a new instance of a DOM org.w3c.dom.Document object to build a DOM tree with. An alternative way to create a DOM Document object is to use the DocumentBuilder.getDOMImplementation() getDOMImplementation method to get a DOM Level 2 DOMImplementation object and then use DOM Level 2 methods on that object to create a DOM Document object. A new instance of a DOM Document object.



parse
public Document parse(InputStream is) throws SAXException, IOException(Code)
Parse the content of the given InputStream as an XML document and return a new DOM org.w3c.dom.Document object.
Parameters:
  is - InputStream containing the content to be parsed.
exception:
  IOException - If any IO errors occur.
exception:
  SAXException - If any parse errors occur.
exception:
  IllegalArgumentException - If the InputStream is null
See Also:   org.xml.sax.DocumentHandler



parse
public Document parse(InputStream is, String systemId) throws SAXException, IOException(Code)
Parse the content of the given InputStream as an XML document and return a new DOM org.w3c.dom.Document object.
Parameters:
  is - InputStream containing the content to be parsed.
Parameters:
  systemId - Provide a base for resolving relative URIs.
exception:
  IOException - If any IO errors occur.
exception:
  SAXException - If any parse errors occur.
exception:
  IllegalArgumentException - If the InputStream is null.
See Also:   org.xml.sax.DocumentHandler A new DOM Document object.



parse
public Document parse(String uri) throws SAXException, IOException(Code)
Parse the content of the given URI as an XML document and return a new DOM org.w3c.dom.Document object.
Parameters:
  uri - The location of the content to be parsed.
exception:
  IOException - If any IO errors occur.
exception:
  SAXException - If any parse errors occur.
exception:
  IllegalArgumentException - If the URI is null.
See Also:   org.xml.sax.DocumentHandler A new DOM Document object.



parse
public Document parse(File f) throws SAXException, IOException(Code)
Parse the content of the given file as an XML document and return a new DOM org.w3c.dom.Document object.
Parameters:
  f - The file containing the XML to parse.
exception:
  IOException - If any IO errors occur.
exception:
  SAXException - If any parse errors occur.
exception:
  IllegalArgumentException - If the file is null.
See Also:   org.xml.sax.DocumentHandler A new DOM Document object.



parse
abstract public Document parse(InputSource is) throws SAXException, IOException(Code)
Parse the content of the given input source as an XML document and return a new DOM org.w3c.dom.Document object.
Parameters:
  is - InputSource containing the content to be parsed.
exception:
  IOException - If any IO errors occur.
exception:
  SAXException - If any parse errors occur.
exception:
  IllegalArgumentException - If the InputSource is null.
See Also:   org.xml.sax.DocumentHandler A new DOM Document object.



setEntityResolver
abstract public void setEntityResolver(org.xml.sax.EntityResolver er)(Code)
Specify the org.xml.sax.EntityResolver to be used to resolve entities present in the XML document to be parsed. Setting this to null will result in the underlying implementation using it's own default implementation and behavior.
Parameters:
  er - The EntityResolver to be used to resolve entitiespresent in the XML document to be parsed.



setErrorHandler
abstract public void setErrorHandler(org.xml.sax.ErrorHandler eh)(Code)
Specify the org.xml.sax.ErrorHandler to be used to report errors present in the XML document to be parsed. Setting this to null will result in the underlying implementation using it's own default implementation and behavior.
Parameters:
  eh - The ErrorHandler to be used to report errorspresent in the XML document to be parsed.



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.