Package nl.siegmann.epublib.chm
Class HHCParser
- java.lang.Object
-
- nl.siegmann.epublib.chm.HHCParser
-
public class HHCParser extends java.lang.ObjectParses the windows help index (.hhc) file.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_HTML_INPUT_ENCODING
-
Constructor Summary
Constructors Constructor Description HHCParser()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.List<TOCReference>parseHhc(java.io.InputStream hhcFile, Resources resources)private static java.util.List<TOCReference>processLiNode(org.w3c.dom.Node liNode, Resources resources)private static TOCReferenceprocessObjectNode(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.private static java.util.List<TOCReference>processUlNode(org.w3c.dom.Node ulNode, Resources resources)
-
-
-
Field Detail
-
DEFAULT_HTML_INPUT_ENCODING
public static final java.lang.String DEFAULT_HTML_INPUT_ENCODING
- See Also:
- Constant Field Values
-
-
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.IOExceptionjavax.xml.parsers.ParserConfigurationExceptionjavax.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'
-
-