Source Code Cross Referenced for SAXParserImpl.java in  » Web-Server » Rimfaxe-Web-Server » com » rimfaxe » xml » xmlreader » 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 Server » Rimfaxe Web Server » com.rimfaxe.xml.xmlreader 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package com.rimfaxe.xml.xmlreader;
002:
003:        import java.io.*;
004:
005:        import javax.xml.parsers.*;
006:        import org.xml.sax.*;
007:        import org.xml.sax.helpers.XMLReaderAdapter;
008:        import org.xml.sax.helpers.DefaultHandler;
009:
010:        /** JAXP compatible XMLReader wrapper for Sparta.
011:
012:         <blockquote><small> Copyright (C) 2002 Hewlett-Packard Company.
013:         This file is part of Sparta, an XML Parser, DOM, and XPath library.
014:         This library is free software; you can redistribute it and/or
015:         modify it under the terms of the <a href="doc-files/LGPL.txt">GNU
016:         Lesser General Public License</a> as published by the Free Software
017:         Foundation; either version 2.1 of the License, or (at your option)
018:         any later version.  This library is distributed in the hope that it
019:         will be useful, but WITHOUT ANY WARRANTY; without even the implied
020:         warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
021:         PURPOSE. </small></blockquote>
022:         @version  $Date: 2002/12/05 04:37:14 $  $Revision: 1.2 $
023:         @author Sergio Marti
024:         */
025:
026:        public class SAXParserImpl extends SAXParser {
027:
028:            private final XMLReaderImpl reader_;
029:            private boolean nsAware_ = false;
030:
031:            public SAXParserImpl(boolean nsAware) {
032:                super ();
033:                nsAware_ = nsAware;
034:                reader_ = new XMLReaderImpl(nsAware);
035:            }
036:
037:            /** Returns the SAX parser that is encapsultated by the implementation 
038:             of this class.
039:             @deprecated because org.xml.sax.Parser is deprecated
040:             */
041:            public org.xml.sax.Parser getParser() {
042:                return new XMLReaderAdapter(reader_);
043:            }
044:
045:            // Returns the XMLReader that is encapsulated by the implementation of 
046:            // this class.          
047:            public XMLReader getXMLReader() {
048:                return reader_;
049:            }
050:
051:            // Returns the particular property requested for in the underlying 
052:            // implementation of XMLReader.
053:            public java.lang.Object getProperty(java.lang.String name) {
054:                return reader_.getProperty(name);
055:            }
056:
057:            // Sets the particular property in the underlying implementation of 
058:            // XMLReader.    
059:            public void setProperty(java.lang.String name,
060:                    java.lang.Object value) {
061:                reader_.setProperty(name, value);
062:            }
063:
064:            // Indicates whether or not this parser is configured to understand 
065:            // namespaces.
066:            public boolean isNamespaceAware() {
067:                return nsAware_;
068:            }
069:
070:            // Indicates whether or not this parser is configured to validate XML 
071:            // documents.
072:            public boolean isValidating() {
073:                return false;
074:            }
075:
076:            // Parse the content of the file specified as XML using the specified 
077:            // DefaultHandler.
078:            public void parse(java.io.File f, DefaultHandler dh)
079:                    throws SAXException, IOException {
080:                reader_.init(dh);
081:                try {
082:                    Parser.parse(f, reader_);
083:                } catch (ParseException pe) {
084:                    dh.fatalError(new SAXParseException(pe.getMessage(), "", f
085:                            .toString(), -1, -1, pe));
086:                }
087:            }
088:
089:            // Parse the content given InputSource as XML using the specified 
090:            // DefaultHandler.    
091:            public void parse(InputSource is, DefaultHandler dh)
092:                    throws SAXException, IOException {
093:                reader_.init(dh);
094:                reader_.parse(is);
095:            }
096:
097:            // Parse the content of the given InputStream instance as XML using 
098:            // the specified DefaultHandler.
099:            public void parse(java.io.InputStream is, DefaultHandler dh)
100:                    throws SAXException, IOException {
101:                parse(new InputSource(is), dh);
102:            }
103:
104:            // Parse the content of the given InputStream instance as XML using 
105:            // the specified DefaultHandler.
106:            public void parse(java.io.InputStream is, DefaultHandler dh,
107:                    java.lang.String systemId) throws SAXException, IOException {
108:                reader_.init(dh);
109:                try {
110:                    Parser.parse(systemId, is, reader_);
111:                } catch (ParseException pe) {
112:                    dh.fatalError(new SAXParseException(pe.getMessage(), "",
113:                            systemId, -1, -1, pe));
114:                }
115:            }
116:
117:            // Parse the content described by the giving Uniform Resource Identifier 
118:            // (URI) as XML using the specified DefaultHandler.
119:            public void parse(java.lang.String uri, DefaultHandler dh)
120:                    throws SAXException, IOException {
121:                reader_.init(dh);
122:                reader_.parse(uri);
123:            }
124:
125:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.