Class DOMParser


  • public class DOMParser
    extends java.lang.Object
    interface for parsing documents in a DOM fasion.

    The factory method in the DOM parser enables extensions to be added by the user through
    plugins.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  DOMParser.Factory
      a factory for DOMParsers.
    • Constructor Summary

      Constructors 
      Constructor Description
      DOMParser​(long cPtr, boolean cMemoryOwn)  
    • Constructor Detail

      • DOMParser

        public DOMParser​(long cPtr,
                         boolean cMemoryOwn)
    • Method Detail

      • getCPtr

        public static long getCPtr​(DOMParser obj)
      • delete

        public void delete()
      • load

        public void load​(java.lang.String filename)
        parse from file
        Parameters:
        filename - [in] name of file
      • load

        public void load​(SWIGTYPE_p_std__istream input)
        parse from stream
        Parameters:
        input - [in] input stream
      • save

        public void save​(java.lang.String filename)
        save DOM structure to file
        Parameters:
        filename - [in] filename
      • setSchema

        public void setSchema​(java.lang.String filename)
        specify the schema file

        Note: not all DOMParser implementations support schema validation
        Parameters:
        filename -
      • getRootElement

        public DOMElemPtr getRootElement()
        get the top/root element in the DOM structure
        Returns:
        root element of dom structure
      • setDebug

        public void setDebug​(boolean debug)
        Enable/disable debugging to the debug Log.
        Parameters:
        debug - [in] true to enable debug output.
      • make

        public static DOMParserPtr make()
        make an instance of the default DOM parser
        Returns:
        a DOM parser for xml files