Java Doc for XmlHelper.java in  » ERP-CRM-Financial » Kuali-Financial-System » edu » iu » uis » eden » util » 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 » ERP CRM Financial » Kuali Financial System » edu.iu.uis.eden.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   edu.iu.uis.eden.util.XmlHelper

XmlHelper
public class XmlHelper (Code)
Provides a set of utilities for XML-related operations.
author:
   rkirkend
author:
   ewestfal
author:
   ahamid


Field Summary
final protected static  org.apache.log4j.LoggerLOG
    

Constructor Summary
public  XmlHelper()
    

Method Summary
public static  voidappendXml(Node parentNode, String xml)
    
public static  org.jdom.DocumentbuildJDocument(StringReader xmlStream)
    
public static  org.jdom.DocumentbuildJDocument(org.w3c.dom.Document document)
    
public static  org.jdom.DocumentbuildJDocument(StringReader xmlStream, boolean validateXML)
     Same as above but can specify whether validation is to be performed or not.
public static  ElementfindElement(Element root, String elementName)
     returns the one element in root according to elementName.
public static  VectorfindElements(Element root, String elementName)
    
public static  ElementgetAttributeElement(Document document, String elementName)
    
public static  ElementgetAttributeRootElement(Document document)
    
public static  StringgetElementAttributeValue(Element root, String elementName, String attributeName)
     Returns the value of the given element names given attribute tag based upon the root element passed in.
public static  StringgetTextContent(org.w3c.dom.Element element)
    
public static  StringjotDocument(org.jdom.Document document)
    
public static  StringjotNode(org.jdom.Element element)
    
public static  StringjotNode(org.w3c.dom.Node node)
    
public static  StringjotNode(org.w3c.dom.Node node, boolean indent)
    
public static  ElementmakeElement(String elementName, String value)
    
public static  booleanpathExists(XPath xpath, String expression, Object object)
     Convenience method that performs an xpath evaluation to determine whether the expression evaluates to true (a node exists).
public static  voidprintDocumentStructure(org.w3c.dom.Document doc)
    
public static  voidprintNode(Node node, int level)
    
public static  voidprintSAXDocumentStructure(Document doc)
    
public static  voidprintSAXNode(Element element, int level)
    
public static  org.w3c.dom.ElementpropertiesToXml(org.w3c.dom.Document doc, Object o, String elementName)
    
public static  voidpropogateNamespace(Element element, Namespace namespace)
    
public static  org.w3c.dom.DocumentreadXml(String xml)
    
public static  StringreaderToString(Reader is)
    
public static  voidtrimElement(Node node)
    
public static  voidtrimSAXElement(Element element)
    
public static  DocumenttrimSAXXml(InputStream input)
    
public static  org.w3c.dom.DocumenttrimXml(InputStream input)
    
public static  voidvalidate(InputSource source)
    
public static  StringwriteNode(org.w3c.dom.Node node)
    
public static  StringwriteNode(org.w3c.dom.Node node, boolean indent)
    

Field Detail
LOG
final protected static org.apache.log4j.Logger LOG(Code)




Constructor Detail
XmlHelper
public XmlHelper()(Code)




Method Detail
appendXml
public static void appendXml(Node parentNode, String xml) throws TransformerException(Code)



buildJDocument
public static org.jdom.Document buildJDocument(StringReader xmlStream) throws InvalidXmlException(Code)



buildJDocument
public static org.jdom.Document buildJDocument(org.w3c.dom.Document document)(Code)



buildJDocument
public static org.jdom.Document buildJDocument(StringReader xmlStream, boolean validateXML) throws InvalidXmlException(Code)
Same as above but can specify whether validation is to be performed or not. Would have liked to have added a property that these methods could have used but would force instantiate on an otherwise static class
Parameters:
  xmlSream -
Parameters:
  validateXML - JDOM Document
throws:
  InvalidXMLException -



findElement
public static Element findElement(Element root, String elementName) throws InvalidXmlException(Code)
returns the one element in root according to elementName. If more than one or none of element exists InvalidXmlException is thrown. This method is based on the assumption you have validated your xml and know the element is there. It provides a way to make code independent of the xml structure i.e. it digs for the element.
Parameters:
  root -
Parameters:
  elementName - Element
throws:
  InvalidXmlException -



findElements
public static Vector findElements(Element root, String elementName)(Code)
Find all Elements in document of a particular name
Parameters:
  root - -the starting Element to scan
Parameters:
  elementName - -name of the Element to scan for Vector - a list of the Elements found - return null if none found



getAttributeElement
public static Element getAttributeElement(Document document, String elementName) throws InvalidXmlException(Code)



getAttributeRootElement
public static Element getAttributeRootElement(Document document) throws InvalidXmlException(Code)



getElementAttributeValue
public static String getElementAttributeValue(Element root, String elementName, String attributeName) throws InvalidXmlException(Code)
Returns the value of the given element names given attribute tag based upon the root element passed in.
Parameters:
  root -
Parameters:
  elementName -
Parameters:
  attributeName - value of the Element's attribute who's name matches the passedelement name and attribute matches the attribute name passes
throws:
  InvalidXmlException - if element or attribute are not present



getTextContent
public static String getTextContent(org.w3c.dom.Element element)(Code)



jotDocument
public static String jotDocument(org.jdom.Document document)(Code)



jotNode
public static String jotNode(org.jdom.Element element)(Code)



jotNode
public static String jotNode(org.w3c.dom.Node node)(Code)



jotNode
public static String jotNode(org.w3c.dom.Node node, boolean indent)(Code)



makeElement
public static Element makeElement(String elementName, String value) throws Exception(Code)
makes a properly formed element in the manner of if value is null value attribute is given an empty value
Parameters:
  elementName -
Parameters:
  value - Element
throws:
  Exception -



pathExists
public static boolean pathExists(XPath xpath, String expression, Object object) throws XPathExpressionException(Code)
Convenience method that performs an xpath evaluation to determine whether the expression evaluates to true (a node exists). This is method exists only to disambiguate the cases of determining the *presence* of a node and determining the *boolean value of the node as converted from a string*, as the syntaxes are very similar and could be misleading.
Parameters:
  xpath - the XPath object
Parameters:
  expression - the XPath expression
Parameters:
  object - the object on which to evaluate the expression as required by the XPath API, typically a Node whether the result of the expression evaluation, which is whether or not a node was present
throws:
  XPathExpressionException -



printDocumentStructure
public static void printDocumentStructure(org.w3c.dom.Document doc)(Code)



printNode
public static void printNode(Node node, int level)(Code)



printSAXDocumentStructure
public static void printSAXDocumentStructure(Document doc)(Code)



printSAXNode
public static void printSAXNode(Element element, int level)(Code)



propertiesToXml
public static org.w3c.dom.Element propertiesToXml(org.w3c.dom.Document doc, Object o, String elementName) throws Exception(Code)



propogateNamespace
public static void propogateNamespace(Element element, Namespace namespace)(Code)



readXml
public static org.w3c.dom.Document readXml(String xml) throws TransformerException(Code)



readerToString
public static String readerToString(Reader is) throws IOException(Code)
readerToString: read entire content of a Reader into a String
Parameters:
  is - String
throws:
  IOException -



trimElement
public static void trimElement(Node node) throws SAXException, IOException, ParserConfigurationException(Code)



trimSAXElement
public static void trimSAXElement(Element element) throws SAXException, IOException, ParserConfigurationException(Code)



trimSAXXml
public static Document trimSAXXml(InputStream input) throws JDOMException, SAXException, IOException, ParserConfigurationException(Code)



trimXml
public static org.w3c.dom.Document trimXml(InputStream input) throws SAXException, IOException, ParserConfigurationException(Code)



validate
public static void validate(InputSource source) throws ParserConfigurationException, IOException, SAXException(Code)



writeNode
public static String writeNode(org.w3c.dom.Node node) throws TransformerException(Code)



writeNode
public static String writeNode(org.w3c.dom.Node node, boolean indent) throws TransformerException(Code)



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.