15.5 Element Content
Take a look again at Figure 15-1 , and ask yourself what the “content” of the
element is. There are three ways we might answer this question:
- The content is the HTML string “This is a simple document.”
- The content is the plain-text string “This is a simple document.”
- The content is a Text node, an Element node that has a Text node child, and another Text node.
Each of these are valid answers, and each answer is useful in its own way. The sections that follow explain how to work with the HTML representation, the plain-text representation, and the tree representation of element content.欢迎转载,转载请注明来自一手册:http://yishouce.com/book/1/27719.html