What is an element?
An element corresponds to a <tag> in an HTML or XML document. It includes not only the name of the tag itself but also its attributes, its contents, etc. It is a tag come to life.
What is a CSS Selector?
CSS has a powerful way of referring to elements within a document. It is like a mini language which allows you to select elements based on their tag name, id, class attribute, etc. Some examples:
div selects all the div elements in your document
div.info selects all the div elements that have a class of 'info'.
div#profile selects the one (if present) element that has the id 'profile'
img[width='200'] selects all the img tags that have a width attribute with a value of '200'
You can also allows you to chain more than one of these selectors together to select elements within elements. Some examples:
div a the space between div and a imply that a must be a descendant of div… ie it is ‘inside’ the div matches <div><a> and <div><p><a> but not <div></div><a> div > a the greater than sign between div and a imply that a must be an immediate child of div matches <div><a> and <div><p></p><a> but not <div><p><a> div + a the plus sign implies that the end of div must be immediately followed by a matches <div></div><a> but not <div><a> or <div></div><p></p><a>
Does ElementParser support Namespaces / XML Schema / Internal Subsets?
No. These were some of the simplifying design decisions.
Does ElementParser perform as quickly as NSXMLParser / lib2xml?
No. That said, in most cases it performs quickly enough… even on the iPhone.