com.aspose.words
Class HtmlControlType

java.lang.Object
    extended by com.aspose.words.HtmlControlType

public class HtmlControlType 
extends java.lang.Object

Utility class containing constants. Type of document nodes that represent <input> and <select> elements imported from HTML.

Example:

Shows how to set preferred type of document nodes that will represent imported <input> and <select> elements.
final String html = "\r\n<html>\r\n<select name='ComboBox' size='1'>\r\n"
        + "<option value='val1'>item1</option>\r\n<option value='val2'></option>\r\n</select>\r\n</html>\r\n";

HtmlLoadOptions htmlLoadOptions = new HtmlLoadOptions();
htmlLoadOptions.setPreferredControlType(HtmlControlType.STRUCTURED_DOCUMENT_TAG);

Document doc = new Document(new ByteArrayInputStream(html.getBytes(StandardCharsets.UTF_8)), htmlLoadOptions);
NodeCollection nodes = doc.getChildNodes(NodeType.STRUCTURED_DOCUMENT_TAG, true);

StructuredDocumentTag tag = (StructuredDocumentTag) nodes.get(0);

Field Summary
static final intFORM_FIELD = 0
          

A form field.

static final intSTRUCTURED_DOCUMENT_TAG = 1
          

A structured document tag

 

Field Detail

FORM_FIELD = 0

public static final int FORM_FIELD

A form field.


STRUCTURED_DOCUMENT_TAG = 1

public static final int STRUCTURED_DOCUMENT_TAG

A structured document tag


See Also:
          Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
          Aspose.Words Support Forum - our preferred method of support.