Java Doc for XmlHandler.java in  » Swing-Library » jEdit » com » microstar » 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 » Swing Library » jEdit » com.microstar.xml 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.microstar.xml.XmlHandler

All known Subclasses:   com.microstar.xml.HandlerBase,
XmlHandler
public interface XmlHandler (Code)
XML Processing Interface.

Whenever you parse an XML document, you must provide an object from a class that implements this interface to receive the parsing events.

If you do not want to implement this entire interface, you can extend the HandlerBase convenience class and then implement only what you need.

If you are using SAX, you should implement the SAX handler interfaces rather than this one.
author:
   Copyright (c) 1997, 1998 by Microstar Software Ltd.
author:
   written by David Megginson <dmeggins@microstar.com>
version:
   1.1
See Also:   XmlParser
See Also:   HandlerBase
See Also:   org.xml.sax.EntityHandler
See Also:   org.xml.sax.DocumentHandler
See Also:   org.xml.sax.ErrorHandler





Method Summary
public  voidattribute(String aname, String value, boolean isSpecified)
     Attribute.
public  voidcharData(char ch, int start, int length)
     Character data.

Ælfred will call this method once for each chunk of character data found in the contents of elements.

public  voiddoctypeDecl(String name, String publicId, String systemId)
     Document type declaration.
public  voidendDocument()
     End the document.
public  voidendElement(String elname)
     End an element.
public  voidendExternalEntity(String systemId)
     End an external entity.
public  voiderror(String message, String systemId, int line, int column)
     Fatal XML parsing error.

Ælfred will call this method whenever it encounters a serious error.

public  voidignorableWhitespace(char ch, int start, int length)
     Ignorable whitespace.
public  voidprocessingInstruction(String target, String data)
     Processing instruction.

Ælfred will call this method once for each processing instruction.

public  ObjectresolveEntity(String publicId, String systemId)
     Resolve an External Entity.

Give the handler a chance to redirect external entities to different URIs.

public  voidstartDocument()
     Start the document.
public  voidstartElement(String elname)
     Start an element.

Ælfred will call this method at the beginning of each element.

public  voidstartExternalEntity(String systemId)
     Begin an external entity.



Method Detail
attribute
public void attribute(String aname, String value, boolean isSpecified) throws java.lang.Exception(Code)
Attribute.

Ælfred will call this method once for each attribute (specified or defaulted) before reporting a startElement event. It is up to your handler to collect the attributes, if necessary.

You may use XmlParser.getAttributeType() to find the attribute's declared type.
Parameters:
  name - The name of the attribute.
Parameters:
  type - The type of the attribute (see below).
Parameters:
  value - The value of the attribute, or null if the attributeis #IMPLIED.
Parameters:
  isSpecified - True if the value was specified, false if itwas defaulted from the DTD.
exception:
  java.lang.Exception - The handler may throw any exception.
See Also:   XmlHandler.startElement
See Also:   XmlParser.declaredAttributes
See Also:   XmlParser.getAttributeType
See Also:   XmlParser.getAttributeDefaultValue




charData
public void charData(char ch, int start, int length) throws java.lang.Exception(Code)
Character data.

Ælfred will call this method once for each chunk of character data found in the contents of elements. Note that the parser may break up a long sequence of characters into smaller chunks and call this method once for each chunk.

Do not attempt to read more than length characters from the array, or to read before the start position.
Parameters:
  ch - The character data.
Parameters:
  start - The starting position in the array.
Parameters:
  length - The number of characters available.
exception:
  java.lang.Exception - The handler may throw any exception.




doctypeDecl
public void doctypeDecl(String name, String publicId, String systemId) throws java.lang.Exception(Code)
Document type declaration.

Ælfred will call this method when or if it encounters the document type (DOCTYPE) declaration.

Please note that the public and system identifiers will not always be a reliable indication of the DTD in use.
Parameters:
  name - The document type name.
Parameters:
  publicId - The public identifier, or null if unspecified.
Parameters:
  systemId - The system identifier, or null if unspecified.
exception:
  java.lang.Exception - The handler may throw any exception.




endDocument
public void endDocument() throws java.lang.Exception(Code)
End the document.

Ælfred will call this method once, when it has finished parsing the XML document. It is guaranteed that this will be the last method called.
exception:
  java.lang.Exception - The handler may throw any exception.
See Also:   XmlHandler.startDocument




endElement
public void endElement(String elname) throws java.lang.Exception(Code)
End an element.

Ælfred will call this method at the end of each element (including EMPTY elements).
Parameters:
  elname - The element type name.
exception:
  java.lang.Exception - The handler may throw any exception.
See Also:   XmlHandler.startElement
See Also:   XmlParser.declaredElements
See Also:   XmlParser.getElementContentType




endExternalEntity
public void endExternalEntity(String systemId) throws java.lang.Exception(Code)
End an external entity.

Ælfred will call this method at the end of each external entity, including the top-level document entity and the external DTD subset.

If necessary, you can use this method to track the location of the current entity so that you can resolve relative URIs correctly.
Parameters:
  systemId - The URI of the external entity that is ending.
exception:
  java.lang.Exception - The handler may throw any exception.
See Also:   XmlHandler.startExternalEntity
See Also:   XmlHandler.resolveEntity




error
public void error(String message, String systemId, int line, int column) throws java.lang.Exception(Code)
Fatal XML parsing error.

Ælfred will call this method whenever it encounters a serious error. The parser will attempt to continue past this point so that you can find more possible error points, but if this method is called you should assume that the document is corrupt and you should not try to use its contents.

Note that you can use the XmlException class to encapsulate all of the information provided, though the use of the class is not mandatory.
Parameters:
  message - The error message.
Parameters:
  systemId - The system identifier of the entity that contains the error.
Parameters:
  line - The approximate line number of the error.
Parameters:
  column - The approximate column number of the error.
exception:
  java.lang.Exception - The handler may throw any exception.
See Also:   XmlException




ignorableWhitespace
public void ignorableWhitespace(char ch, int start, int length) throws java.lang.Exception(Code)
Ignorable whitespace.

Ælfred will call this method once for each sequence of ignorable whitespace in element content (never in mixed content).

For details, see section 2.10 of the XML 1.0 recommendation.

Do not attempt to read more than length characters from the array or to read before the start position.
Parameters:
  ch - The literal whitespace characters.
Parameters:
  start - The starting position in the array.
Parameters:
  length - The number of whitespace characters available.
exception:
  java.lang.Exception - The handler may throw any exception.




processingInstruction
public void processingInstruction(String target, String data) throws java.lang.Exception(Code)
Processing instruction.

Ælfred will call this method once for each processing instruction. Note that processing instructions may appear outside of the top-level element. The
Parameters:
  target - The target (the name at the start of the PI).
Parameters:
  data - The data, if any (the rest of the PI).
exception:
  java.lang.Exception - The handler may throw any exception.




resolveEntity
public Object resolveEntity(String publicId, String systemId) throws java.lang.Exception(Code)
Resolve an External Entity.

Give the handler a chance to redirect external entities to different URIs. Ælfred will call this method for the top-level document entity, for external text (XML) entities, and the external DTD subset (if any).
Parameters:
  publicId - The public identifier, or null if none was supplied.
Parameters:
  systemId - The system identifier. The replacement system identifier, or null to usethe default.
exception:
  java.lang.Exception - The handler may throw any exception.
See Also:   XmlHandler.startExternalEntity
See Also:   XmlHandler.endExternalEntity




startDocument
public void startDocument() throws java.lang.Exception(Code)
Start the document.

Ælfred will call this method just before it attempts to read the first entity (the root of the document). It is guaranteed that this will be the first method called.
exception:
  java.lang.Exception - The handler may throw any exception.
See Also:   XmlHandler.endDocument




startElement
public void startElement(String elname) throws java.lang.Exception(Code)
Start an element.

Ælfred will call this method at the beginning of each element. By the time this is called, all of the attributes for the element will already have been reported using the attribute method.
Parameters:
  elname - The element type name.
exception:
  java.lang.Exception - The handler may throw any exception.
See Also:   XmlHandler.attribute
See Also:   XmlHandler.endElement
See Also:   XmlParser.declaredElements
See Also:   XmlParser.getElementContentType




startExternalEntity
public void startExternalEntity(String systemId) throws java.lang.Exception(Code)
Begin an external entity.

Ælfred will call this method at the beginning of each external entity, including the top-level document entity and the external DTD subset (if any).

If necessary, you can use this method to track the location of the current entity so that you can resolve relative URIs correctly.
Parameters:
  systemId - The URI of the external entity that is starting.
exception:
  java.lang.Exception - The handler may throw any exception.
See Also:   XmlHandler.endExternalEntity
See Also:   XmlHandler.resolveEntity




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