HtmlControlType
Inheritance: java.lang.Object
public class HtmlControlType
Type of document nodes that represent and elements imported from HTML. Examples:Shows how to set preferred type of document nodes that will represent imported and elements. final String html = “\r\n\r\n\r\n” + “item1\r\n\r\n\r\n\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);
Fields
| Field | Description |
|---|---|
| FORM_FIELD | A form field. |
| STRUCTURED_DOCUMENT_TAG | A structured document tag |
| length |
Methods
| Method | Description |
|---|---|
| fromName(String htmlControlTypeName) | |
| getName(int htmlControlType) | |
| getValues() | |
| toString(int htmlControlType) |
FORM_FIELD
public static int FORM_FIELD
A form field.
STRUCTURED_DOCUMENT_TAG
public static int STRUCTURED_DOCUMENT_TAG
A structured document tag
length
public static int length
fromName(String htmlControlTypeName)
public static int fromName(String htmlControlTypeName)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| htmlControlTypeName | java.lang.String |
Returns: int
getName(int htmlControlType)
public static String getName(int htmlControlType)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| htmlControlType | int |
Returns: java.lang.String
getValues()
public static int[] getValues()
Returns: int[]
toString(int htmlControlType)
public static String toString(int htmlControlType)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| htmlControlType | int |
Returns: java.lang.String