Java Doc for XMLUtil.java in  » Parser » NanoXML » 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 » Parser » NanoXML » 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: RELEASE_2_2_1 $, $Revision: 1.5 $




Method Summary
static  booleancheckLiteral(IXMLReader reader, 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 entity)
     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  voiderrorUnexpectedCDATA(String systemID, int lineNr)
     Throws an XMLParseException to indicate that a CDATA section is unexpected at this point.
static  voiderrorUnexpectedElement(String systemID, int lineNr, String parentElementName, String unexpectedElementName)
     Throws an XMLValidationException to indicate that an element is unexpected.
static  voiderrorUnexpectedEntity(String systemID, int lineNr, String entity)
     Throws an XMLParseException to indicate that an entity reference is unexpected at this point.
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  charprocessCharLiteral(String entity)
     Processes a character literal.
static  voidprocessEntity(String entity, IXMLReader reader, IXMLEntityResolver entityResolver)
     Processes an entity.
static  Stringread(IXMLReader reader, char entityChar)
     Reads a character from the reader.
Parameters:
  reader - the reader
Parameters:
  entityChar - the escape character (& or %) used to indicatean entity the character, or an entity expression (like e.g.
static  charreadChar(IXMLReader reader, char entityChar)
     Reads a character from the reader disallowing entities.
static  StringscanIdentifier(IXMLReader reader)
     Retrieves an identifier from the data.
static  StringscanPublicID(StringBuffer publicID, IXMLReader reader)
     Scans a public ID.
static  StringscanString(IXMLReader reader, char entityChar, IXMLEntityResolver entityResolver)
     Retrieves a delimited string from the data.
static  StringscanSystemID(IXMLReader reader)
     Scans a system ID.
static  voidskipComment(IXMLReader reader)
     Skips the remainder of a comment.
static  voidskipTag(IXMLReader reader)
     Skips the remainder of the current XML tag.
static  voidskipWhitespace(IXMLReader reader, StringBuffer buffer)
     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, 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:
  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 of the data source
Parameters:
  lineNr - the line number in the data source



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 of the data source
Parameters:
  lineNr - the line number in the data source
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 of the data source
Parameters:
  lineNr - the line number in the data source
Parameters:
  elementName - the name of the element
Parameters:
  attributeName - the name of the attribute
Parameters:
  attributeValue - the value of that attribute



errorInvalidEntity
static void errorInvalidEntity(String systemID, int lineNr, String entity) throws XMLParseException(Code)
Throws an XMLParseException to indicate that an entity could not be resolved.
Parameters:
  systemID - the system ID of the data source
Parameters:
  lineNr - the line number in the data source
Parameters:
  entity - 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 of the data source
Parameters:
  lineNr - the line number in the data source
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 of the data source
Parameters:
  lineNr - the line number in the data source
Parameters:
  elementName - the name of the element
Parameters:
  attributeName - the name of the missing 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 of the data source
Parameters:
  lineNr - the line number in the data source
Parameters:
  parentElementName - the name of the parent element
Parameters:
  missingElementName - the name of the missing element



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 of the data source
Parameters:
  lineNr - the line number in the data source
Parameters:
  parentElementName - the name of the parent 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 of the data source
Parameters:
  lineNr - the line number in the data source
Parameters:
  elementName - the name of the element
Parameters:
  attributeName - the name of the unexpected attribute



errorUnexpectedCDATA
static void errorUnexpectedCDATA(String systemID, int lineNr) throws XMLParseException(Code)
Throws an XMLParseException to indicate that a CDATA section is unexpected at this point.
Parameters:
  systemID - the system ID of the data source
Parameters:
  lineNr - the line number in the data source



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 of the data source
Parameters:
  lineNr - the line number in the data source
Parameters:
  parentElementName - the name of the parent element
Parameters:
  unexpectedElementName - the name of the unexpected element



errorUnexpectedEntity
static void errorUnexpectedEntity(String systemID, int lineNr, String entity) throws XMLParseException(Code)
Throws an XMLParseException to indicate that an entity reference is unexpected at this point.
Parameters:
  systemID - the system ID of the data source
Parameters:
  lineNr - the line number in the data source
Parameters:
  entity - the name of the entity



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 of the data source
Parameters:
  lineNr - the line number in the data source
Parameters:
  parentElementName - the name of the parent 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 of the data source
Parameters:
  lineNr - the line number in the data source
Parameters:
  expectedName - the name of the opening tag
Parameters:
  wrongName - the name of the closing tag



processCharLiteral
static char processCharLiteral(String entity) throws IOException, XMLParseException(Code)
Processes a character literal.
Parameters:
  entity - the entity
throws:
  java.io.IOException - if an error occurred reading the data



processEntity
static void processEntity(String entity, IXMLReader reader, IXMLEntityResolver entityResolver) throws IOException, XMLParseException(Code)
Processes an entity.
Parameters:
  entity - the entity
Parameters:
  reader - the reader
Parameters:
  entityResolver - the entity resolver
throws:
  java.io.IOException - if an error occurred reading the data



read
static String read(IXMLReader reader, char entityChar) throws IOException, XMLParseException(Code)
Reads a character from the reader.
Parameters:
  reader - the reader
Parameters:
  entityChar - the escape character (& or %) used to indicatean entity the character, or an entity expression (like e.g. <)
throws:
  java.io.IOException - if an error occurred reading the data



readChar
static char readChar(IXMLReader reader, char entityChar) throws IOException, XMLParseException(Code)
Reads a character from the reader disallowing entities.
Parameters:
  reader - the reader
Parameters:
  entityChar - the escape character (& or %) used to indicatean entity



scanIdentifier
static String scanIdentifier(IXMLReader reader) throws IOException, XMLParseException(Code)
Retrieves an identifier from the data.
Parameters:
  reader - the reader
throws:
  java.io.IOException - if an error occurred reading the data



scanPublicID
static String scanPublicID(StringBuffer publicID, IXMLReader reader) throws IOException, XMLParseException(Code)
Scans a public ID.
Parameters:
  publicID - will contain the public ID
Parameters:
  reader - the reader the system ID
throws:
  java.io.IOException - if an error occurred reading the data



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



scanSystemID
static String scanSystemID(IXMLReader reader) throws IOException, XMLParseException(Code)
Scans a system ID.
Parameters:
  reader - the reader the system ID
throws:
  java.io.IOException - if an error occurred reading the data



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



skipTag
static void skipTag(IXMLReader reader) throws IOException, XMLParseException(Code)
Skips the remainder of the current XML tag.
Parameters:
  reader - the reader
throws:
  java.io.IOException - if an error occurred reading the data



skipWhitespace
static void skipWhitespace(IXMLReader reader, StringBuffer buffer) throws IOException(Code)
Skips whitespace from the reader.
Parameters:
  reader - the reader
Parameters:
  buffer - where to put the whitespace; null if thewhitespace does not have to be stored.
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 of the data source
Parameters:
  lineNr - the line number in the data source
Parameters:
  message - the error message
Parameters:
  elementName - the name of the element
Parameters:
  attributeName - the name of the attribute
Parameters:
  attributeValue - the value of that 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.