}
public static HypertextType parseHypertextType(String htmlOrig, ParsePosition pp) {
String html = htmlOrig;
ObjectFactory of = new ObjectFactory();
HypertextType result = of.createHypertextType();
int pos = html.indexOf('<');
while (pos != -1) {
if (pos != 0)
result.getContent().add(parseHTML(html.substring(0, pos)));
html = html.substring(pos);
if (html.startsWith("<i>") || html.startsWith("<b>")) {
ParsePosition ppp = new ParsePosition(0);
HypertextType inner = parseHypertextType(html.substring(3), ppp);
if (!html.substring(ppp.getIndex() + 3, ppp.getIndex() + 7).equals("</" + html.substring(1, 3)))
throw new RuntimeException("Start " + html.substring(0, 3) + " was closed by " + html.substring(ppp.getIndex() + 3, ppp.getIndex() + 7));
if (html.startsWith("<b>")) {
result.getContent().add(of.createHypertextTypeBold(inner));
} else {