org.apache.struts2.views.xslt
类 StringAdapter

java.lang.Object
  继承者 org.apache.struts2.views.xslt.AbstractAdapterNode
      继承者 org.apache.struts2.views.xslt.AbstractAdapterElement
          继承者 org.apache.struts2.views.xslt.StringAdapter
所有已实现的接口:
AdapterNode, Element, Node

public class StringAdapter
extends AbstractAdapterElement

StringAdapter adapts a Java String value to a DOM Element with the specified property name containing the String's text. e.g. a property

String getFoo() { return "My Text!"; }
will appear in the result DOM as: MyText! Subclasses may override the getStringValue() method in order to use StringAdapter as a simplified custom XML adapter for Java types. A subclass can enable XML parsing of the value string via the setParseStringAsXML() method and then override getStringValue() to return a String containing the custom formatted XML.


字段摘要
 
从接口 org.w3c.dom.Node 继承的字段
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
构造方法摘要
StringAdapter()
           
StringAdapter(AdapterFactory adapterFactory, AdapterNode parent, String propertyName, String value)
           
 
方法摘要
 boolean getParseStringAsXML()
          Is this StringAdapter to interpret its string values as containing XML Text?
 void setParseStringAsXML(boolean parseStringAsXML)
          When set to true the StringAdapter will interpret its String value as containing XML text and parse it to a DOM Element.
 
从类 org.apache.struts2.views.xslt.AbstractAdapterElement 继承的方法
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getNodeName, getNodeType, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, hasChildNodes, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS
 
从类 org.apache.struts2.views.xslt.AbstractAdapterNode 继承的方法
appendChild, cloneNode, compareDocumentPosition, getAdapterFactory, getAttributes, getBaseURI, getChildAfter, getChildBefore, getChildBeforeOrAfter, getChildNodes, getElementsByTagName, getElementsByTagNameNS, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeValue, getOwnerDocument, getParent, getParentNode, getPrefix, getPreviousSibling, getPropertyName, getPropertyValue, getTextContent, getUserData, hasAttributes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setAdapterFactory, setNodeValue, setParent, setPrefix, setPropertyName, setPropertyValue, setTextContent, setUserData, toString
 
从类 java.lang.Object 继承的方法
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
从接口 org.w3c.dom.Element 继承的方法
getElementsByTagName, getElementsByTagNameNS
 
从接口 org.w3c.dom.Node 继承的方法
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
 

构造方法详细信息

StringAdapter

public StringAdapter()

StringAdapter

public StringAdapter(AdapterFactory adapterFactory,
                     AdapterNode parent,
                     String propertyName,
                     String value)
方法详细信息

getParseStringAsXML

public boolean getParseStringAsXML()
Is this StringAdapter to interpret its string values as containing XML Text?

另请参见:
setParseStringAsXML(boolean)

setParseStringAsXML

public void setParseStringAsXML(boolean parseStringAsXML)
When set to true the StringAdapter will interpret its String value as containing XML text and parse it to a DOM Element. The new DOM Element will be a child of this String element. (i.e. wrapped in an element of the property name specified for this StringAdapter).

参数:
parseStringAsXML -
另请参见:
getParseStringAsXML()