| Start |
|---|
| Reading a XML file In order to load the XML data with XOM (opens new window) you will need to make a To get the root element, the highest parent in the xml file, you need to use the Now the Element class has a lot of handy methods that make reading xml really easy. Some of the most useful are listed below:
When you call the Example: Here is an example of reading an XML File: XML File: Code for reading and printing it: This will print out in the console: |
| Writing to a XML File Writing to a XML File using XOM (opens new window) is very similar to reading it except in this case we are making the instances instead of retrieving them off the root. To make a new Element use the constructor The
The Once you have all of your elements add to your root element you can turn it into a You can use a Example Code: This will be the contents of "out.xml": |
Read Article
https://develop.horje.com/learn/1434/reference