Exploring XML Elements

Like HTML elements, XML elements are the items that make up the structure of the file. An element consists of the opening tag, the attributes (if any), the data, and the closing tag. If the element contains nested sub elements, they are considered to be part of the element in a parent/child relationship.

Note

Valid element names must start with an alphabetic character (A to Z or a to z) or an underscore (_). The remainder of the name can consist of letters, digits, hyphens, underscores, or periods. Strings that begin with xml or XML (or any combination of upper- or lowercase) are reserved and should not be used. Case is significant, so make sure that you are consistent.

Element Attributes

As in HTML, you ...

Get Sams Teach Yourself Microsoft® Windows® DNA Programming in 21 Days now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.