Class HHCParser


  • public class HHCParser
    extends java.lang.Object
    Parses the windows help index (.hhc) file.
    • Field Detail

      • DEFAULT_HTML_INPUT_ENCODING

        public static final java.lang.String DEFAULT_HTML_INPUT_ENCODING
        See Also:
        Constant Field Values
    • Constructor Detail

      • HHCParser

        public HHCParser()
    • Method Detail

      • parseHhc

        public static java.util.List<TOCReference> parseHhc​(java.io.InputStream hhcFile,
                                                            Resources resources)
                                                     throws java.io.IOException,
                                                            javax.xml.parsers.ParserConfigurationException,
                                                            javax.xml.xpath.XPathExpressionException
        Throws:
        java.io.IOException
        javax.xml.parsers.ParserConfigurationException
        javax.xml.xpath.XPathExpressionException
      • processUlNode

        private static java.util.List<TOCReference> processUlNode​(org.w3c.dom.Node ulNode,
                                                                  Resources resources)
      • processLiNode

        private static java.util.List<TOCReference> processLiNode​(org.w3c.dom.Node liNode,
                                                                  Resources resources)
      • processObjectNode

        private static TOCReference processObjectNode​(org.w3c.dom.Node objectNode,
                                                      Resources resources)
        Processes a CHM object node into a TOCReference If the local name is empty then a TOCReference node is made with a null href value.
        Parameters:
        objectNode -
        Returns:
        A TOCReference of the object has a non-blank param child with name 'Name' and a non-blank param name 'Local'