NpsHtmlParser is used to analyze web page,and get the fields in HTML.
| void |
NpsHtmlparser(String url,String encoding) Constructor. |
| org.w3c.dom.Element |
GetElementById(String id) Get element by id |
| org.w3c.dom.Node[] |
GetElementsByName(String name) Get elements by name |
| org.w3c.dom.Node[] |
GetElementsByTagName(String name) Get elements by tag name such as input,select,etc. |
| org.w3c.dom.Node[] |
GetElementsByTagNameAndFilter(String name,String formula) Get elements by tag name which result of formula is true. See NpsFormula.All attributes will be added as symbol automatically. e.g.GetElementsByTagNameAndFilter("input","type='hidden'") indicate to find hidden input elements |
| String |
GetNodeValue(org.w3c.dom.Node obj) Get the node value |
| String |
GetAttributeValue(org.w3c.dom.Node obj,String attribute_name) Get the attribute value |
| String |
ExtractFileNameFromURL(String url) return file name of URL e.g. ExtractFileNameFromURL("http://www.sina.com.cn/news/1883.jpg") return "1883.jpg" |
| String |
GetSuffixOfFileName(String filename) Get the suffix of file |