Java Doc for XMLUtil.java in  » Installer » IzPack » net » n3 » nanoxml » 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 » Installer » IzPack » net.n3.nanoxml 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   net.n3.nanoxml.XMLUtil

XMLUtil
class XMLUtil (Code)
Utility methods for NanoXML.
author:
   Marc De Scheemaecker
version:
   $Name$, $Revision: 1421 $




Method Summary
static  booleancheckLiteral(IXMLReader reader, char escapeChar, IXMLEntityResolver entityResolver, String literal)
     Returns true if the data starts with literal.
static  voiderrorClosingTagNotEmpty(String systemID, int lineNr)
     Throws an XMLParseException to indicate that extra data is encountered in a closing tag.
static  voiderrorExpectedInput(String systemID, int lineNr, String expectedString)
     Throws an XMLParseException to indicate that an expected string is not encountered.
static  voiderrorInvalidAttributeValue(String systemID, int lineNr, String elementName, String attributeName, String attributeValue)
     Throws an XMLValidationException to indicate that an attribute has an invalid value.
static  voiderrorInvalidEntity(String systemID, int lineNr, String key)
     Throws an XMLParseException to indicate that an entity could not be resolved.
static  voiderrorInvalidInput(String systemID, int lineNr, String unexpectedString)
     Throws an XMLParseException to indicate that a string is not expected at this point.
static  voiderrorMissingAttribute(String systemID, int lineNr, String elementName, String attributeName)
     Throws an XMLValidationException to indicate that an attribute is missing.
static  voiderrorMissingElement(String systemID, int lineNr, String parentElementName, String missingElementName)
     Throws an XMLValidationException to indicate that an element is missing.
static  voiderrorMissingPCData(String systemID, int lineNr, String parentElementName)
     Throws an XMLValidationException to indicate that a #PCDATA element was missing.
static  voiderrorUnexpectedAttribute(String systemID, int lineNr, String elementName, String attributeName)
     Throws an XMLValidationException to indicate that an attribute is unexpected.
static  voiderrorUnexpectedElement(String systemID, int lineNr, String parentElementName, String unexpectedElementName)
     Throws an XMLValidationException to indicate that an element is unexpected.
static  voiderrorUnexpectedPCData(String systemID, int lineNr, String parentElementName)
     Throws an XMLValidationException to indicate that a #PCDATA element was unexpected.
static  voiderrorWrongClosingTag(String systemID, int lineNr, String expectedName, String wrongName)
     Throws an XMLParseException to indicate that the closing tag of an element does not match the opening tag.
static  charread(IXMLReader reader, boolean[] isEntityValue, char escapeChar, IXMLEntityResolver entityResolver)
     Reads a character from the reader.
static  ReaderscanEntity(boolean[] isCharLiteral, IXMLReader reader, char escapeChar, IXMLEntityResolver entityResolver)
     Processes an entity.
static  StringscanIdentifier(IXMLReader reader, char escapeChar, IXMLEntityResolver entityResolver)
     Retrieves an identifier from the data.
static  StringscanPublicID(StringBuffer publicID, IXMLReader reader, char escapeChar, IXMLEntityResolver entityResolver)
     Scans a public ID.
static  StringscanString(IXMLReader reader, char escapeChar, boolean normalizeWhitespace, IXMLEntityResolver entityResolver)
     Retrieves a delimited string from the data.
static  StringscanSystemID(IXMLReader reader, char escapeChar, IXMLEntityResolver entityResolver)
     Scans a system ID.
static  voidskipComment(IXMLReader reader, IXMLEntityResolver entityResolver)
     Skips the remainder of a comment.
static  voidskipTag(IXMLReader reader, char escapeChar, IXMLEntityResolver entityResolver)
     Skips the remainder of the current XML tag.
static  voidskipWhitespace(IXMLReader reader, char escapeChar, StringBuffer buffer, boolean[] isEntity)
     Skips whitespace from the reader.
static  voidvalidationError(String systemID, int lineNr, String message, String elementName, String attributeName, String attributeValue)
     Throws an XMLValidationException.



Method Detail
checkLiteral
static boolean checkLiteral(IXMLReader reader, char escapeChar, IXMLEntityResolver entityResolver, String literal) throws IOException, XMLParseException(Code)
Returns true if the data starts with literal. Enough chars are read to determine this result.
Parameters:
  reader - the reader
Parameters:
  escapeChar - the escape character (& or %)
Parameters:
  entityResolver - the entity resolver
Parameters:
  literal - the literal to check
throws:
  java.io.IOException - if an error occurred reading the data



errorClosingTagNotEmpty
static void errorClosingTagNotEmpty(String systemID, int lineNr) throws XMLParseException(Code)
Throws an XMLParseException to indicate that extra data is encountered in a closing tag.
Parameters:
  systemID - the system ID from where the data came
Parameters:
  lineNr - the line number in the XML data where the exception occurred.



errorExpectedInput
static void errorExpectedInput(String systemID, int lineNr, String expectedString) throws XMLParseException(Code)
Throws an XMLParseException to indicate that an expected string is not encountered.
Parameters:
  systemID - the system ID from where the data came
Parameters:
  lineNr - the line number in the XML data where the exception occurred.
Parameters:
  expectedString - the string that is expected



errorInvalidAttributeValue
static void errorInvalidAttributeValue(String systemID, int lineNr, String elementName, String attributeName, String attributeValue) throws XMLValidationException(Code)
Throws an XMLValidationException to indicate that an attribute has an invalid value.
Parameters:
  systemID - the system ID from where the data came
Parameters:
  lineNr - the line number in the XML data where the exception occurred.
Parameters:
  elementName - the name of the offending element
Parameters:
  attributeName - the name of the offending attribute
Parameters:
  attributeValue - the value of the offending attribute



errorInvalidEntity
static void errorInvalidEntity(String systemID, int lineNr, String key) throws XMLParseException(Code)
Throws an XMLParseException to indicate that an entity could not be resolved.
Parameters:
  systemID - the system ID from where the data came
Parameters:
  lineNr - the line number in the XML data where the exception occurred.
Parameters:
  key - the name of the entity



errorInvalidInput
static void errorInvalidInput(String systemID, int lineNr, String unexpectedString) throws XMLParseException(Code)
Throws an XMLParseException to indicate that a string is not expected at this point.
Parameters:
  systemID - the system ID from where the data came
Parameters:
  lineNr - the line number in the XML data where the exception occurred.
Parameters:
  unexpectedString - the string that is unexpected



errorMissingAttribute
static void errorMissingAttribute(String systemID, int lineNr, String elementName, String attributeName) throws XMLValidationException(Code)
Throws an XMLValidationException to indicate that an attribute is missing.
Parameters:
  systemID - the system ID from where the data came
Parameters:
  lineNr - the line number in the XML data where the exception occurred.
Parameters:
  elementName - the name of the offending element
Parameters:
  attributeName - the name of the offending attribute



errorMissingElement
static void errorMissingElement(String systemID, int lineNr, String parentElementName, String missingElementName) throws XMLValidationException(Code)
Throws an XMLValidationException to indicate that an element is missing.
Parameters:
  systemID - the system ID from where the data came
Parameters:
  lineNr - the line number in the XML data where the exception occurred.
Parameters:
  parentElementName - the name of the offending element
Parameters:
  missingElementName - the name of the offending attribute



errorMissingPCData
static void errorMissingPCData(String systemID, int lineNr, String parentElementName) throws XMLValidationException(Code)
Throws an XMLValidationException to indicate that a #PCDATA element was missing.
Parameters:
  systemID - the system ID from where the data came
Parameters:
  lineNr - the line number in the XML data where the exception occurred.
Parameters:
  parentElementName - the name of the offending element



errorUnexpectedAttribute
static void errorUnexpectedAttribute(String systemID, int lineNr, String elementName, String attributeName) throws XMLValidationException(Code)
Throws an XMLValidationException to indicate that an attribute is unexpected.
Parameters:
  systemID - the system ID from where the data came
Parameters:
  lineNr - the line number in the XML data where the exception occurred.
Parameters:
  elementName - the name of the offending element
Parameters:
  attributeName - the name of the offending attribute



errorUnexpectedElement
static void errorUnexpectedElement(String systemID, int lineNr, String parentElementName, String unexpectedElementName) throws XMLValidationException(Code)
Throws an XMLValidationException to indicate that an element is unexpected.
Parameters:
  systemID - the system ID from where the data came
Parameters:
  lineNr - the line number in the XML data where the exception occurred.
Parameters:
  parentElementName - the name of the parent attribute
Parameters:
  unexpectedElementName - the name of the offending attribute



errorUnexpectedPCData
static void errorUnexpectedPCData(String systemID, int lineNr, String parentElementName) throws XMLValidationException(Code)
Throws an XMLValidationException to indicate that a #PCDATA element was unexpected.
Parameters:
  systemID - the system ID from where the data came
Parameters:
  lineNr - the line number in the XML data where the exception occurred.
Parameters:
  parentElementName - the name of the offending element



errorWrongClosingTag
static void errorWrongClosingTag(String systemID, int lineNr, String expectedName, String wrongName) throws XMLParseException(Code)
Throws an XMLParseException to indicate that the closing tag of an element does not match the opening tag.
Parameters:
  systemID - the system ID from where the data came
Parameters:
  lineNr - the line number in the XML data where the exception occurred.
Parameters:
  expectedName - the name of the opening tag
Parameters:
  wrongName - the name of the closing tag



read
static char read(IXMLReader reader, boolean[] isEntityValue, char escapeChar, IXMLEntityResolver entityResolver) throws IOException, XMLParseException(Code)
Reads a character from the reader.
Parameters:
  reader - the reader
Parameters:
  isEntityValue - if the character is the first character in an entity
Parameters:
  escapeChar - the escape character (& or %)
Parameters:
  entityResolver - the entity resolver
throws:
  java.io.IOException - if an error occurred reading the data



scanEntity
static Reader scanEntity(boolean[] isCharLiteral, IXMLReader reader, char escapeChar, IXMLEntityResolver entityResolver) throws IOException, XMLParseException(Code)
Processes an entity.
Parameters:
  isCharLiteral - will contain true if the entity is a char literal
Parameters:
  reader - the reader
Parameters:
  escapeChar - the escape character (& or %)
Parameters:
  entityResolver - the entity resolver a reader from which the entity value can be retrieved
throws:
  java.io.IOException - if an error occurred reading the data



scanIdentifier
static String scanIdentifier(IXMLReader reader, char escapeChar, IXMLEntityResolver entityResolver) throws IOException, XMLParseException(Code)
Retrieves an identifier from the data.
Parameters:
  reader - the reader
Parameters:
  escapeChar - the escape character (& or %)
Parameters:
  entityResolver - the entity resolver
throws:
  java.io.IOException - if an error occurred reading the data



scanPublicID
static String scanPublicID(StringBuffer publicID, IXMLReader reader, char escapeChar, IXMLEntityResolver entityResolver) throws IOException, XMLParseException(Code)
Scans a public ID.
Parameters:
  publicID - will contain the public ID
Parameters:
  reader - the reader
Parameters:
  escapeChar - the escape character (& or %)
Parameters:
  entityResolver - the entity resolver the system ID
throws:
  java.io.IOException - if an error occurred reading the data



scanString
static String scanString(IXMLReader reader, char escapeChar, boolean normalizeWhitespace, IXMLEntityResolver entityResolver) throws IOException, XMLParseException(Code)
Retrieves a delimited string from the data.
Parameters:
  reader - the reader
Parameters:
  escapeChar - the escape character (& or %)
Parameters:
  normalizeWhitespace - if all whitespace chars need to be converted to spaces
Parameters:
  entityResolver - the entity resolver
throws:
  java.io.IOException - if an error occurred reading the data



scanSystemID
static String scanSystemID(IXMLReader reader, char escapeChar, IXMLEntityResolver entityResolver) throws IOException, XMLParseException(Code)
Scans a system ID.
Parameters:
  reader - the reader
Parameters:
  escapeChar - the escape character (& or %)
Parameters:
  entityResolver - the entity resolver the system ID
throws:
  java.io.IOException - if an error occurred reading the data



skipComment
static void skipComment(IXMLReader reader, IXMLEntityResolver entityResolver) throws IOException, XMLParseException(Code)
Skips the remainder of a comment. It is assumed that <!- is already read.
Parameters:
  reader - the reader
Parameters:
  entityResolver - the entity resolver
throws:
  java.io.IOException - if an error occurred reading the data



skipTag
static void skipTag(IXMLReader reader, char escapeChar, IXMLEntityResolver entityResolver) throws IOException, XMLParseException(Code)
Skips the remainder of the current XML tag.
Parameters:
  reader - the reader
Parameters:
  escapeChar - the escape character (& or %)
Parameters:
  entityResolver - the entity resolver
throws:
  java.io.IOException - if an error occurred reading the data



skipWhitespace
static void skipWhitespace(IXMLReader reader, char escapeChar, StringBuffer buffer, boolean[] isEntity) throws IOException(Code)
Skips whitespace from the reader.
Parameters:
  reader - the reader
Parameters:
  escapeChar - the escape character (& or %)
Parameters:
  buffer - where to put the whitespace; null if the whitespace does not have to be stored.
Parameters:
  isEntity - if not null, will contain true if the data following the whitespace is anentity
throws:
  java.io.IOException - if an error occurred reading the data



validationError
static void validationError(String systemID, int lineNr, String message, String elementName, String attributeName, String attributeValue) throws XMLValidationException(Code)
Throws an XMLValidationException.
Parameters:
  systemID - the system ID from where the data came
Parameters:
  lineNr - the line number in the XML data where the exception occurred.
Parameters:
  message - the message of the exception.
Parameters:
  elementName - the name of the offending element
Parameters:
  attributeName - the name of the offending attribute
Parameters:
  attributeValue - the value of the offending attribute



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.