HTML node types and corresponding values

Source: Internet
Author: User

The elements on the page are nodes (node) with ELEMENT nodes

node), attribute nodes (Attribute node), text nodes, and so on. The definition of NodeType is as follows:
Const unsigned short element_node = 1;
Const unsigned short attribute_node = 2;
Const unsigned short text_node = 3;
Const unsigned short cdata_section_node = 4;
Const unsigned short entity_reference_node = 5;
Const unsigned Short entity_node = 6;
Const unsigned Short processing_instruction_node = 7;
Const unsigned short comment_node = 8;
Const unsigned Short document_node = 9;
Const unsigned short document_type_node = 10;
Const unsigned short document_fragment_node = 11;
Const unsigned short notation_node = 12;

For example, determine the type of a node can be used *.nodetype==

Of course, you can use *.nodetypename, too.

HTML node types and corresponding values

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.