Class XMLHelper

java.lang.Object
org.hibernate.search.util.XMLHelper

public class XMLHelper extends Object
A utility class to help with xml parsing
  • Constructor Details

    • XMLHelper

      public XMLHelper()
  • Method Details

    • elementFromString

      public static Element elementFromString(String xml) throws Exception
      Converts a String representing an XML snippet into an Element.
      Parameters:
      xml - snippet as a string
      Returns:
      a DOM Element
      Throws:
      Exception - if unable to parse the String or if it doesn't contain valid XML.