Java Doc for Element.java in  » XML » kXML » org » kxml2 » kdom » 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 » XML » kXML » org.kxml2.kdom 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.kxml2.kdom.Node
      org.kxml2.kdom.Element

Element
public class Element extends Node (Code)
In order to create an element, please use the createElement method instead of invoking the constructor directly. The right place to add user defined initialization code is the init method.


Field Summary
protected  Vectorattributes
    
protected  Stringname
    
protected  Stringnamespace
    
protected  Nodeparent
    
protected  Vectorprefixes
    

Constructor Summary
public  Element()
    

Method Summary
public  voidclear()
    
public  ElementcreateElement(String namespace, String name)
     Forwards creation request to parent if any, otherwise calls super.createElement.
public  intgetAttributeCount()
     Returns the number of attributes of this element.
public  StringgetAttributeName(int index)
    
public  StringgetAttributeNamespace(int index)
    
public  StringgetAttributeValue(int index)
    
public  StringgetAttributeValue(String namespace, String name)
    
public  StringgetName()
    
public  StringgetNamespace()
    
public  intgetNamespaceCount()
    
public  StringgetNamespacePrefix(int i)
    
public  StringgetNamespaceUri(String prefix)
    
public  StringgetNamespaceUri(int i)
    
public  NodegetParent()
    
public  NodegetRoot()
     Returns the root node, determined by ascending to the all parents un of the root element.
public  voidinit()
     called when all properties are set, but before children are parsed.
public  voidparse(XmlPullParser parser)
     Builds the child elements from the given Parser.
public  voidsetAttribute(String namespace, String name, String value)
    
public  voidsetName(String name)
    
public  voidsetNamespace(String namespace)
     sets the namespace of the element.
protected  voidsetParent(Node parent)
     Sets the Parent of this element.
public  voidsetPrefix(String prefix, String namespace)
    
public  voidwrite(XmlSerializer writer)
     Writes this element and all children to the given XmlWriter.

Field Detail
attributes
protected Vector attributes(Code)



name
protected String name(Code)



namespace
protected String namespace(Code)



parent
protected Node parent(Code)



prefixes
protected Vector prefixes(Code)




Constructor Detail
Element
public Element()(Code)




Method Detail
clear
public void clear()(Code)
removes all children and attributes



createElement
public Element createElement(String namespace, String name)(Code)
Forwards creation request to parent if any, otherwise calls super.createElement.



getAttributeCount
public int getAttributeCount()(Code)
Returns the number of attributes of this element.



getAttributeName
public String getAttributeName(int index)(Code)



getAttributeNamespace
public String getAttributeNamespace(int index)(Code)



getAttributeValue
public String getAttributeValue(int index)(Code)



getAttributeValue
public String getAttributeValue(String namespace, String name)(Code)



getName
public String getName()(Code)
returns the (local) name of the element



getNamespace
public String getNamespace()(Code)
returns the namespace of the element



getNamespaceCount
public int getNamespaceCount()(Code)
returns the number of declared namespaces, NOT including parent elements



getNamespacePrefix
public String getNamespacePrefix(int i)(Code)



getNamespaceUri
public String getNamespaceUri(String prefix)(Code)
returns the namespace for the given prefix



getNamespaceUri
public String getNamespaceUri(int i)(Code)



getParent
public Node getParent()(Code)
Returns the parent node of this element



getRoot
public Node getRoot()(Code)
Returns the root node, determined by ascending to the all parents un of the root element.



init
public void init()(Code)
called when all properties are set, but before children are parsed. Please do not use setParent for initialization code any longer.



parse
public void parse(XmlPullParser parser) throws IOException, XmlPullParserException(Code)
Builds the child elements from the given Parser. By overwriting parse, an element can take complete control over parsing its subtree.



setAttribute
public void setAttribute(String namespace, String name, String value)(Code)
Sets the given attribute; a value of null removes the attribute



setName
public void setName(String name)(Code)
sets the name of the element



setNamespace
public void setNamespace(String namespace)(Code)
sets the namespace of the element. Please note: For no namespace, please use Xml.NO_NAMESPACE, null is not a legal value. Currently, null is converted to Xml.NO_NAMESPACE, but future versions may throw an exception.



setParent
protected void setParent(Node parent)(Code)
Sets the Parent of this element. Automatically called from the add method. Please use with care, you can simply create inconsitencies in the document tree structure using this method!



setPrefix
public void setPrefix(String prefix, String namespace)(Code)
Sets the given prefix; a namespace value of null removess the prefix



write
public void write(XmlSerializer writer) throws IOException(Code)
Writes this element and all children to the given XmlWriter.



Fields inherited from org.kxml2.kdom.Node
final public static int CDSECT(Code)(Java Doc)
final public static int COMMENT(Code)(Java Doc)
final public static int DOCDECL(Code)(Java Doc)
final public static int DOCUMENT(Code)(Java Doc)
final public static int ELEMENT(Code)(Java Doc)
final public static int ENTITY_REF(Code)(Java Doc)
final public static int IGNORABLE_WHITESPACE(Code)(Java Doc)
final public static int PROCESSING_INSTRUCTION(Code)(Java Doc)
final public static int TEXT(Code)(Java Doc)
protected Vector children(Code)(Java Doc)
protected StringBuffer types(Code)(Java Doc)

Methods inherited from org.kxml2.kdom.Node
public void addChild(int index, int type, Object child)(Code)(Java Doc)
public void addChild(int type, Object child)(Code)(Java Doc)
public Element createElement(String namespace, String name)(Code)(Java Doc)
public Object getChild(int index)(Code)(Java Doc)
public int getChildCount()(Code)(Java Doc)
public Element getElement(int index)(Code)(Java Doc)
public Element getElement(String namespace, String name)(Code)(Java Doc)
public String getText(int index)(Code)(Java Doc)
public int getType(int index)(Code)(Java Doc)
public int indexOf(String namespace, String name, int startIndex)(Code)(Java Doc)
public boolean isText(int i)(Code)(Java Doc)
public void parse(XmlPullParser parser) throws IOException, XmlPullParserException(Code)(Java Doc)
public void removeChild(int idx)(Code)(Java Doc)
public void write(XmlSerializer writer) throws IOException(Code)(Java Doc)
public void writeChildren(XmlSerializer writer) throws IOException(Code)(Java Doc)

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.