Java Doc for DOMUtils.java in  » J2EE » enhydra » samples » addr » 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 » J2EE » enhydra » samples.addr 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   samples.addr.DOMUtils

DOMUtils
public class DOMUtils (Code)

author:
   Matthew J. Duftler
author:
   Sanjiva Weerawarana




Method Summary
public static  intcountKids(Element elem, short nodeType)
     Count number of children of a certain type of the given element.
public static  ElementfindChildElementWithAttribute(Element elem, String attrName, String attrValue)
     Return the first child element of the given element which has the given attribute with the given value.
public static  StringgetAttribute(Element el, String attrName)
     Returns the value of an attribute of an element.
public static  StringgetAttributeNS(Element el, String namespaceURI, String localPart)
     Returns the value of an attribute of an element.
public static  StringgetChildCharacterData(Element parentEl)
     Concat all the text and cdata node children of this elem and return the resulting text.
Parameters:
  parentEl - the element whose cdata/text node values are tobe combined.
public static  ElementgetElementByID(Element el, String id)
    
public static  ElementgetFirstChildElement(Element elem)
     Return the first child element of the given element.
public static  StringgetNamespaceURIFromPrefix(Node context, String prefix)
     Given a prefix and a node, return the namespace URI that the prefix has been associated with.
public static  ElementgetNextSiblingElement(Element elem)
     Return the next sibling element of the given element.



Method Detail
countKids
public static int countKids(Element elem, short nodeType)(Code)
Count number of children of a certain type of the given element.
Parameters:
  elem - the element whose kids are to be counted the number of matching kids.



findChildElementWithAttribute
public static Element findChildElementWithAttribute(Element elem, String attrName, String attrValue)(Code)
Return the first child element of the given element which has the given attribute with the given value.
Parameters:
  elem - the element whose children are to be searched
Parameters:
  attrName - the attrib that must be present
Parameters:
  attrValue - the desired value of the attribute the first matching child element.



getAttribute
public static String getAttribute(Element el, String attrName)(Code)
Returns the value of an attribute of an element. Returns null if the attribute is not found (whereas Element.getAttribute returns "" if an attrib is not found).
Parameters:
  el - Element whose attrib is looked for
Parameters:
  attrName - name of attribute to look for the attribute value



getAttributeNS
public static String getAttributeNS(Element el, String namespaceURI, String localPart)(Code)
Returns the value of an attribute of an element. Returns null if the attribute is not found (whereas Element.getAttributeNS returns "" if an attrib is not found).
Parameters:
  el - Element whose attrib is looked for
Parameters:
  namespaceURI - namespace URI of attribute to look for
Parameters:
  localPart - local part of attribute to look for the attribute value



getChildCharacterData
public static String getChildCharacterData(Element parentEl)(Code)
Concat all the text and cdata node children of this elem and return the resulting text.
Parameters:
  parentEl - the element whose cdata/text node values are tobe combined. the concatanated string.



getElementByID
public static Element getElementByID(Element el, String id)(Code)



getFirstChildElement
public static Element getFirstChildElement(Element elem)(Code)
Return the first child element of the given element. Null if no children are found.
Parameters:
  elem - Element whose child is to be returned the first child element.



getNamespaceURIFromPrefix
public static String getNamespaceURIFromPrefix(Node context, String prefix)(Code)
Given a prefix and a node, return the namespace URI that the prefix has been associated with. This method is useful in resolving the namespace URI of attribute values which are being interpreted as QNames. If prefix is null, this method will return the default namespace.
Parameters:
  context - the starting node (looks up recursively from here)
Parameters:
  prefix - the prefix to find an xmlns:prefix=uri for the namespace URI or null if not found



getNextSiblingElement
public static Element getNextSiblingElement(Element elem)(Code)
Return the next sibling element of the given element. Null if no more sibling elements are found.
Parameters:
  elem - Element whose sibling element is to be returned the next sibling element.



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.