FileDocCategorySizeDatePackage
XPathContainer.javaAPI DocJava SE 6 API2350Tue Jun 10 00:23:04 BST 2008com.sun.org.apache.xml.internal.security.transforms.params

XPathContainer

public class XPathContainer extends SignatureElementProxy implements TransformParam
This Object serves both as namespace prefix resolver and as container for the ds:XPath Element. It implements the {@link org.w3c.dom.Element} interface and can be used directly in a DOM tree.
author
Christian Geuer-Pollmann

Fields Summary
Constructors Summary
public XPathContainer(Document doc)
Constructor XPathContainer

param
doc

      super(doc);
   
Methods Summary
public java.lang.StringgetBaseLocalName()

inheritDoc

      return Constants._TAG_XPATH;
   
public java.lang.StringgetXPath()
Returns the TEXT value of the ds:XPath Element.

return
the TEXT value of the ds:XPath Element.

      return this.getTextFromTextChild();
   
public voidsetXPath(java.lang.String xpath)
Sets the TEXT value of the ds:XPath Element.

param
xpath


      if (this._constructionElement.getChildNodes() != null) {
         NodeList nl = this._constructionElement.getChildNodes();

         for (int i = 0; i < nl.getLength(); i++) {
            this._constructionElement.removeChild(nl.item(i));
         }
      }

      Text xpathText = this._doc.createTextNode(xpath);
      this._constructionElement.appendChild(xpathText);