Introduction To XML Trees
- XML document has a single root node.
- The tree is a general ordered tree.
- A parent node may have any number of children.
- Child nodes are ordered and may have siblings.
- Preorder traversals are usually used to get the information, out of the tree.
![Trees]()
Simple XML Document
- <?xml version = “1.0” ?> <address>
- <name>
- <first>Alice</first></br>
- <last>Lee</last></br>
- </name>
- <email>[email protected]</email></br>
- <phone>123-45-6789</phone></br>
- <birthday>
- <year>1983</year></br>
- <month>07</month></br>
- <day>15</day>
- </birthday>
- </address>
Program Demo
Write the code from XMLCopyEditor.
Save Any Location(EX:Sample.xml).
![code]()
Output
![Output]()