Java Doc for XMLElement.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.XMLElement

XMLElement
public class XMLElement implements Serializable(Code)
XMLElement is an XML element. The standard NanoXML builder generates a tree of such elements.
See Also:   net.n3.nanoxml.StdXMLBuilder
author:
   Marc De Scheemaecker
version:
   $Name$, $Revision: 2056 $


Field Summary
final public static  intNO_LINE
     No line number defined.
final static  longserialVersionUID
     Necessary for serialization.

Constructor Summary
public  XMLElement()
     Creates an empty element to be used for #PCDATA content.
public  XMLElement(String name)
     Creates an empty element.
public  XMLElement(String name, String systemID, int lineNr)
     Creates an empty element.

Method Summary
public  voidaddChild(XMLElement child)
     Adds a child element.
public  EnumerationenumerateAttributeNames()
     Returns an enumeration of all attribute names.
public  EnumerationenumerateChildren()
     Returns an enumeration of all child elements.
protected  voidfinalize()
     Cleans up the object when it's destroyed.
public  StringgetAttribute(String name)
     Returns the value of an attribute.
Parameters:
  name - the non-null name of the attribute.
public  StringgetAttribute(String name, String defaultValue)
     Returns the value of an attribute.
Parameters:
  name - the non-null name of the attribute.
Parameters:
  defaultValue - the default value of the attribute.
public  PropertiesgetAttributes()
     Returns all attributes as a Properties object.
public  XMLElementgetChildAtIndex(int index)
     Returns the child at a specific index.
public  VectorgetChildren()
     Returns a vector containing all the child elements.
public  intgetChildrenCount()
     Returns the number of children.
public  Vector<XMLElement>getChildrenNamed(String name)
     Returns a vector of all child elements named name.
Parameters:
  name - the name of the children to search for.
public  StringgetContent()
     Return the #PCDATA content of the element.
public  XMLElementgetFirstChildNamed(String name)
     Searches a child element.
Parameters:
  name - the name of the child to search for.
public  intgetLineNr()
     Returns the line number in the data where the element started.
public  StringgetName()
     Returns the name of the element.
public  StringgetSystemID()
     Returns the system ID of the data where the element started.
public  booleanhasAttribute(String name)
     Returns whether an attribute exists.
public  booleanhasChildren()
     Returns whether the element has children.
public  booleanisLeaf()
     Returns whether the element is a leaf element.
public  voidremoveAttribute(String name)
     Removes an attribute.
public  voidremoveChild(XMLElement child)
     Removes a child element.
public  voidremoveChildAtIndex(int index)
     Removes the child located at a certain index.
public  voidsetAttribute(String name, String value)
     Sets an attribute.
public  voidsetContent(String content)
     Sets the #PCDATA content.
public  voidsetName(String name)
     Sets the name.

Field Detail
NO_LINE
final public static int NO_LINE(Code)
No line number defined.



serialVersionUID
final static long serialVersionUID(Code)
Necessary for serialization.




Constructor Detail
XMLElement
public XMLElement()(Code)
Creates an empty element to be used for #PCDATA content.



XMLElement
public XMLElement(String name)(Code)
Creates an empty element.
Parameters:
  name - the name of the element.



XMLElement
public XMLElement(String name, String systemID, int lineNr)(Code)
Creates an empty element.
Parameters:
  name - the name of the element.
Parameters:
  systemID - the system ID of the XML data where the element starts.
Parameters:
  lineNr - the line in the XML data where the element starts.




Method Detail
addChild
public void addChild(XMLElement child)(Code)
Adds a child element.
Parameters:
  child - the non-null child to add.



enumerateAttributeNames
public Enumeration enumerateAttributeNames()(Code)
Returns an enumeration of all attribute names. the non-null enumeration.



enumerateChildren
public Enumeration enumerateChildren()(Code)
Returns an enumeration of all child elements. the non-null enumeration



finalize
protected void finalize() throws Throwable(Code)
Cleans up the object when it's destroyed.



getAttribute
public String getAttribute(String name)(Code)
Returns the value of an attribute.
Parameters:
  name - the non-null name of the attribute. the value, or null if the attribute does not exist.



getAttribute
public String getAttribute(String name, String defaultValue)(Code)
Returns the value of an attribute.
Parameters:
  name - the non-null name of the attribute.
Parameters:
  defaultValue - the default value of the attribute. the value, or defaultValue if the attribute does not exist.



getAttributes
public Properties getAttributes()(Code)
Returns all attributes as a Properties object. the non-null set.



getChildAtIndex
public XMLElement getChildAtIndex(int index) throws ArrayIndexOutOfBoundsException(Code)
Returns the child at a specific index. the non-null child
throws:
  java.lang.ArrayIndexOutOfBoundsException - if the index is out of bounds.



getChildren
public Vector getChildren()(Code)
Returns a vector containing all the child elements. the vector.



getChildrenCount
public int getChildrenCount()(Code)
Returns the number of children. the count.



getChildrenNamed
public Vector<XMLElement> getChildrenNamed(String name)(Code)
Returns a vector of all child elements named name.
Parameters:
  name - the name of the children to search for. the non-null vector of child elements.



getContent
public String getContent()(Code)
Return the #PCDATA content of the element. If the element has a combination of #PCDATA content and child elements, the #PCDATA sections can be retrieved as unnamed child objects. In this case, this method returns null. the content.



getFirstChildNamed
public XMLElement getFirstChildNamed(String name)(Code)
Searches a child element.
Parameters:
  name - the name of the child to search for. the child element, or null if no such child was found.



getLineNr
public int getLineNr()(Code)
Returns the line number in the data where the element started. the line number, or NO_LINE if unknown.
See Also:   XMLElement.NO_LINE
See Also:   XMLElement.getSystemID



getName
public String getName()(Code)
Returns the name of the element. the name, or null if the element only contains #PCDATA.



getSystemID
public String getSystemID()(Code)
Returns the system ID of the data where the element started. the system ID, or null if unknown.
See Also:   XMLElement.getLineNr



hasAttribute
public boolean hasAttribute(String name)(Code)
Returns whether an attribute exists. true if the attribute exists.



hasChildren
public boolean hasChildren()(Code)
Returns whether the element has children. true if the element has children.



isLeaf
public boolean isLeaf()(Code)
Returns whether the element is a leaf element. true if the element has no children.



removeAttribute
public void removeAttribute(String name)(Code)
Removes an attribute.
Parameters:
  name - the non-null name of the attribute.



removeChild
public void removeChild(XMLElement child)(Code)
Removes a child element.
Parameters:
  child - the non-null child to remove.



removeChildAtIndex
public void removeChildAtIndex(int index)(Code)
Removes the child located at a certain index.
Parameters:
  index - the index of the child, where the first child has index 0.



setAttribute
public void setAttribute(String name, String value)(Code)
Sets an attribute.
Parameters:
  name - the non-null name of the attribute.
Parameters:
  value - the non-null value of the attribute.



setContent
public void setContent(String content)(Code)
Sets the #PCDATA content. It is an error to call this method with a non-null value if there are child objects.
Parameters:
  content - the (possibly null) content.



setName
public void setName(String name)(Code)
Sets the name.
Parameters:
  name - the non-null 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.