Class MCRNodeBuilder

java.lang.Object
org.mycore.common.xml.MCRNodeBuilder

public class MCRNodeBuilder extends Object
Author:
Frank Lützenkirchen
  • Constructor Details

    • MCRNodeBuilder

      public MCRNodeBuilder()
    • MCRNodeBuilder

      public MCRNodeBuilder(Map<String,Object> variables)
  • Method Details

    • getFirstNodeBuilt

      public Object getFirstNodeBuilt()
    • buildElement

      public Element buildElement(String xPath, String value, Parent parent) throws org.jaxen.JaxenException
      Throws:
      org.jaxen.JaxenException
    • buildAttribute

      public Attribute buildAttribute(String xPath, String value, Parent parent) throws org.jaxen.JaxenException
      Throws:
      org.jaxen.JaxenException
    • buildNode

      public Object buildNode(String xPath, String value, Parent parent) throws org.jaxen.JaxenException
      Throws:
      org.jaxen.JaxenException
    • getValueOf

      public String getValueOf(String xPath, Parent parent)
      Resolves the first match for the given XPath and returns its value as a String
      Parameters:
      xPath - the XPath expression
      parent - the context element or document
      Returns:
      the value of the element or attribute as a String
    • simplify

      public static String simplify(String xPath)
      Removes obsolete child:: and attribute:: axis prefixes from given XPath