HTMLParser2 parser2 = new HTMLParser2();
HTMLDocument document = parser2.createDocument(bytes, "utf-8");
String titlePathValue = "BODY[0].DIV[1].TABLE[0].TBODY[0].TR[0].TD[0].P[1]";
NodePathParser pathParser = new NodePathParser();
HTMLExtractor htmlExtractor = new HTMLExtractor();
NodePath titlePath = pathParser.toPath(titlePathValue);
HTMLNode titleNode = htmlExtractor.lookNode(document.getRoot(), titlePath);
String titleThread = buildText(titleNode);
String [] postPathValues = {
"BODY[0].DIV[1].TABLE[1].TBODY[0].TR[0].TD[0].DIV[1].DIV[0].DIV[0].TABLE[0]",
"BODY[0].DIV[1].TABLE[1].TBODY[0].TR[0].TD[0].TABLE[*].TBODY[0].TR[0].TD[1].DIV[0].DIV[0].DIV[0].TABLE[0]"
};
NodePath [] postPaths = pathParser.toNodePath(postPathValues);
HTMLDocument document2 = htmlExtractor.extract(document, postPaths);
String userPathValue = "TABLE[*].TBODY[0].TR[0].TD[0].TABLE[0].TBODY[0].TR[0].TD[0].TABLE[0].TBODY[0].TR[0].TD[0].NOBR[0].A[0]";
NodePath userPath = pathParser.toPath(userPathValue);
List<HTMLNode> userNodes = htmlExtractor.matchNodes(document2.getRoot(), userPath);
List<String> users = new ArrayList<String>();
for(HTMLNode userNode : userNodes) {
users.add(buildText(userNode));
}
String textPostPathValue = "TABLE[*].TBODY[0].TR[0].TD[1].TABLE[0].TBODY[0].TR[1]";
NodePath textPostPath = pathParser.toPath(textPostPathValue);
List<HTMLNode> textPostNodes = htmlExtractor.matchNodes(document2.getRoot(), textPostPath);
List<String> posts = new ArrayList<String>();
for(HTMLNode textPostNode : textPostNodes) {
posts.add(buildText(textPostNode));
}