HtmlControlType
Contenuti
[
Nascondere
]HtmlControlType enumeration
Tipo di nodi del documento che rappresentano gli elementi <input> e <select> importati da HTML.
public enum HtmlControlType
I valori
Nome | Valore | Descrizione |
---|---|---|
FormField | 0 | Un campo modulo. |
StructuredDocumentTag | 1 | Un tag di documento strutturato |
Esempi
Mostra come impostare il tipo preferito di nodi del documento che rappresenteranno gli elementi <input> e <select> importati.
const string html = @"
<html>
<select name='ComboBox' size='1'>
<option value='val1'>item1</option>
<option value='val2'></option>
</select>
</html>
";
HtmlLoadOptions htmlLoadOptions = new HtmlLoadOptions();
htmlLoadOptions.PreferredControlType = HtmlControlType.StructuredDocumentTag;
Document doc = new Document(new MemoryStream(Encoding.UTF8.GetBytes(html)), htmlLoadOptions);
NodeCollection nodes = doc.GetChildNodes(NodeType.StructuredDocumentTag, true);
StructuredDocumentTag tag = (StructuredDocumentTag) nodes[0];
Guarda anche
- spazio dei nomi Aspose.Words.Loading
- assemblea Aspose.Words