| Constructor and Description | 
|---|
Tag(String tag)  |  
          
Tag(String tag, Map<String,String> attr) 
            
              Construct a tag. 
               |  
          
Tag(String tag, Map<String,String> attr, Map<String,String> css, String ns)  |  
          
Tag(String tag, Map<String,String> attr, String ns) 
            
              Create a new tag object. 
               |  
          
Tag(String tag, String ns) 
            
              Create a new tag object. 
               |  
          
| Modifier and Type | Method and Description | 
|---|---|
void |  
           addChild(Tag t) 
            
              Add a child tag to this tag. 
               |  
          
boolean |  
           compareTag(Tag t) 
            
              Compare this tag with t for namespace and name equality. 
               |  
          
Map<String,String> |  
           getAttributes()  |  
          
Tag |  
           getChild(String name, String ns) 
            
              Finds the first child that matches the given name and namespace. 
               |  
          
Tag |  
           getChild(String name, String ns, boolean recursive) 
            
              Finds the first child that matches the given name and ns. 
               |  
          
List<Tag> |  
           getChildren() 
            
              Returns all children of this tag. 
               |  
          
List<Tag> |  
           getChildren(String name) 
            
              Returns all children of this tag with the given name. 
               |  
          
Map<String,String> |  
           getCSS() 
            
              Returns a Map of css property, value. 
               |  
          
Object |  
           getLastMarginBottom()  |  
          
String |  
           getName() 
            
              Returns the name of the tag. 
               (Actually the same as getTag method, but after using XMLWorker for a while we caught ourself always trying to call Tag#getName() instead of Tag#getTag())  |  
          
String |  
           getNameSpace()  |  
          
Tag |  
           getParent() 
            
              Returns the parent tag for this tag. 
               |  
          
String |  
           getTag() 
             Deprecated.  
                marked as deprecated in favor for getName, we won't remove it yet. 
               
             |  
          
boolean |  
           hasChild(String name, String ns) 
            
              Check if this tag has a child with the given name and namespace. 
               |  
          
boolean |  
           hasChild(String name, String ns, boolean recursive) 
            
              Check if this tag has a child with the given name and namespace. 
               |  
          
boolean |  
           hasChildren() 
            
              Whether or not this tag has children. 
               |  
          
boolean |  
           hasParent() 
            
              Whether or not this tag has a parent. 
               |  
          
Iterator<Tag> |  
           iterator()  |  
          
void |  
           setCSS(Map<String,String> css) 
            
              Set the css map. 
               |  
          
void |  
           setLastMarginBottom(Object lastMarginBottom)  |  
          
void |  
           setParent(Tag parent) 
            
              Set the tags parent tag. 
               |  
          
String |  
           toString() 
            
              Print the tag 
               |  
          
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic Tag(String tag, Map<String,String> attr)
tag - the tag name 
           attr - the attributes in the tag 
           public Tag(String tag)
tag - the tag name 
           public Tag(String tag, Map<String,String> attr, Map<String,String> css, String ns)
tag - the tag name 
           attr - the attributes 
           css - a map with CSS 
           ns - the namespace 
           public Tag(String tag, Map<String,String> attr, String ns)
tag - the tag name 
           attr - the attributes 
           ns - the namespace 
           public void setParent(Tag parent)
parent - the parent tag of this tag 
           public Tag getParent()
@Deprecated public String getTag()
public Map<String,String> getCSS()
public void setCSS(Map<String,String> css)
null is given the css is cleared. 
          css - set css properties 
           public void addChild(Tag t)
t - the tag 
           public List<Tag> getChildren()
public List<Tag> getChildren(String name)
name - the name of the tags to look for 
           public String getNameSpace()
public boolean compareTag(Tag t)
t - the tag to compare with 
           public Tag getChild(String name, String ns)
name - the name of the tag 
           ns - the namespace 
           public Tag getChild(String name, String ns, boolean recursive)
name - name of the tag 
           ns - the namespace 
           recursive - true if the tree should be fully inwards inspected. 
           public boolean hasChildren()
public boolean hasParent()
null 
           public boolean hasChild(String name, String ns)
name - the name of the tag to look for 
           ns - the namespace (if no namespace, set an empty String) 
           public boolean hasChild(String name, String ns, boolean recursive)
name - the name of the tag to look for 
           ns - the namespace (if no namespace, set an empty String) 
           recursive - true if children's children children children ... should be inspected too. 
           public String getName()
public Object getLastMarginBottom()
public void setLastMarginBottom(Object lastMarginBottom)
Copyright © 1998–2019. All rights reserved.