Examples of HypertextType


Examples of factbookxml.converter.schema.HypertextType

  }

  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 {
View Full Code Here

Examples of factbookxml.converter.schema.HypertextType

      if (pos != 0)
        result.getContent().add(parseHTML(html.substring(0, pos)));
      html = html.substring(pos);
      if (html.startsWith("<i>") || html.startsWith("<b>")) {
        ParsePosition pp = new ParsePosition(0);
        HypertextType inner = parseHypertextType(html.substring(3), pp);
        if (!html.substring(pp.getIndex() + 3, pp.getIndex() + 7).equals("</" + html.substring(1, 3)))
          throw new RuntimeException("Start " + html.substring(0, 3) + " was closed by " + html.substring(pp.getIndex() + 3, pp.getIndex() + 7));
        if (html.startsWith("<b>")) {
          result.getContent().add(of.createDefinitionTypeBold(inner));
        } else {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.