Java Doc for XMLUtils.java in  » Library » Apache-commons-betwixt-0.8-src » org » apache » commons » betwixt » 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 » Library » Apache commons betwixt 0.8 src » org.apache.commons.betwixt 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.commons.betwixt.XMLUtils

XMLUtils
public class XMLUtils (Code)

XMLUtils contains basic utility methods for XML.

The code for XMLUtils.isWellFormedXMLName is based on code in org.apache.xerces.util.XMLChar in Apache Xerces. The authors of this class are credited below.


author:
   Glenn Marcy, IBM
author:
   Andy Clark, IBM
author:
   Eric Ye, IBM
author:
   Arnaud Le Hors, IBM
author:
   Rahul Srivastava, Sun Microsystems Inc.
author:
   Robert Burrell Donkin
since:
   0.5


Field Summary
final public static  StringAMPERSAND_ENTITY
    
final public static  StringAPOSTROPHE_ENTITY
    
final public static  StringGREATER_THAN_ENTITY
    
final public static  StringLESS_THAN_ENTITY
    
final public static  StringQUOTE_ENTITY
    

Constructor Summary
public  XMLUtils()
    

Constructor for use by tools that required JavaBean instances.

This constructor is public only to permit tools that require a JavaBean instance to operate. XMLUtils instances should not be constructed in standard programming.


Method Summary
final public static  StringescapeAttributeValue(Object value)
    

Escape the toString of the given object.

final public static  StringescapeBodyValue(Object value)
    

Escape the toString of the given object.

final public static  StringescapeCDATAContent(String content)
     Escapes the given content suitable for insertion within a CDATA sequence. Within a CDATA section, only the CDEnd string ']]>' is recognized as markup.
Parameters:
  content - the body content whose character data should be escaped in a way appropriate for use within a CDATAsection of xml.
final public static  voidescapeCDATAContent(StringBuffer bufferedContent)
     Escapes the given content suitable for insertion within a CDATA sequence.
public static  booleanisNameChar(int c)
     Returns true if the specified character is a valid name character as defined by the XML 1.0 specification.
Parameters:
  c - The character to check.
public static  booleanisNameStartChar(int c)
     Returns true if the specified character is a valid name start character as defined in the XML 1.0 specification.
Parameters:
  c - The character to check.
public static  booleanisWellFormedXMLName(String name)
    

Is this string a well formed xml name?

Only certain characters are allowed in well formed element and attribute names in xml.


Field Detail
AMPERSAND_ENTITY
final public static String AMPERSAND_ENTITY(Code)
Escaped & entity



APOSTROPHE_ENTITY
final public static String APOSTROPHE_ENTITY(Code)
Escaped ' entity



GREATER_THAN_ENTITY
final public static String GREATER_THAN_ENTITY(Code)
Escaped > entity



LESS_THAN_ENTITY
final public static String LESS_THAN_ENTITY(Code)
Escaped < entity



QUOTE_ENTITY
final public static String QUOTE_ENTITY(Code)
Escaped " entity




Constructor Detail
XMLUtils
public XMLUtils()(Code)

Constructor for use by tools that required JavaBean instances.

This constructor is public only to permit tools that require a JavaBean instance to operate. XMLUtils instances should not be constructed in standard programming. Instead, the class methods should be called directly.





Method Detail
escapeAttributeValue
final public static String escapeAttributeValue(Object value)(Code)

Escape the toString of the given object. For use in an attribute value.


Parameters:
  value - escape value.toString() text with characters restricted (for use in attributes) escaped



escapeBodyValue
final public static String escapeBodyValue(Object value)(Code)

Escape the toString of the given object. For use as body text.


Parameters:
  value - escape value.toString() text with escaped delimiters



escapeCDATAContent
final public static String escapeCDATAContent(String content)(Code)
Escapes the given content suitable for insertion within a CDATA sequence. Within a CDATA section, only the CDEnd string ']]>' is recognized as markup.
Parameters:
  content - the body content whose character data should be escaped in a way appropriate for use within a CDATAsection of xml. escaped character data, not null



escapeCDATAContent
final public static void escapeCDATAContent(StringBuffer bufferedContent)(Code)
Escapes the given content suitable for insertion within a CDATA sequence. Within a CDATA section, only the CDEnd string ']]>' is recognized as markup.
Parameters:
  bufferedContent - the body content within a buffer whose character data should be escaped in a way appropriate for use within a CDATAsection of xml



isNameChar
public static boolean isNameChar(int c)(Code)
Returns true if the specified character is a valid name character as defined by the XML 1.0 specification.
Parameters:
  c - The character to check. true if this is an XML name character



isNameStartChar
public static boolean isNameStartChar(int c)(Code)
Returns true if the specified character is a valid name start character as defined in the XML 1.0 specification.
Parameters:
  c - The character to check. trus if this is an XML name start character



isWellFormedXMLName
public static boolean isWellFormedXMLName(String name)(Code)

Is this string a well formed xml name?

Only certain characters are allowed in well formed element and attribute names in xml. For example, white space is not allowed in a name.

The code for this method is based on code in org.apache.xerces.util.XMLChar in Apache Xerces. The authors of this class are credited at the top of this class.


Parameters:
  name - the String to be checked for use as an xml attribute or element name. Returns false if name is null true if this string would be a well-formed name



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.