Class XmlPropertyUtils


  • public final class XmlPropertyUtils
    extends Object
    Provides utility methods around schema seed XML manipulation.
    • Method Detail

      • getElement

        public static Element getElement​(Document document,
                                         String elementXPath)
        Return the schema XML element for the given XML document and XPath.
        Parameters:
        document - the non-null XML document
        elementXPath - the non-null XPath containing the location of the element
        Returns:
        the configured element for the given XML document and XPath
      • getOrCreateElement

        public static Element getOrCreateElement​(Document document,
                                                 String elementXPath)
        Resolve an element using an XPath. If the element does not exist, it will be created.
        Parameters:
        document - the non-null XML document
        elementXPath - the XPath locating the element
        Returns:
        the XML element