The simplest way is to use
DataSet[
^], which provide a way to
read[
^] and
write[
^] XML.
In this case, you need to add two
DataTables[
^] to the DataSet, one for
path
node and one for
option
node. Each DataTable should contains columns which correspond to node structure (respectively:
path1
to
path4
and
option1
to
option2
).
There is several other ways to to that (i.e.:
XmlDocument[
^]), but i suggest to move your attention on
XML serialization and deserialization[
^], which can help you to convert an object into an XML form and vice versa. Use
SearchBox[
^] on the right-top corner of this site to search for articles about XML serialization and deserialization.