C
Chris Vendel
I'm in doubt as to how best to handle the following 'challenge'...
I want to render an XML file from two XML sources. One is a template
and the other (if available) contains data I wish to add. The
resulting (XML) should contain all the structure from the 'Template
XML' and the matching data from the 'Data XML'.
An example:
Template XML -------------------------
<root>
<person>
<firstname></firstname>
<lastname></lastname>
<address></address>
</person>
<details>
<age></age>
<length></length>
</details>
</root>
Data XML ------------------------------
<root>
<lastname>Hastings</lastname>
<age>28</age>
</root>
Should parse to (Resulting XML)--------
<root>
<person>
<firstname></firstname>
<lastname>Hastings</lastname>
<address></address>
</person>
<details>
<age>28</age>
<length></length>
</details>
</root>
Any advise would be appreciated!
Cheers!
Chris
I want to render an XML file from two XML sources. One is a template
and the other (if available) contains data I wish to add. The
resulting (XML) should contain all the structure from the 'Template
XML' and the matching data from the 'Data XML'.
An example:
Template XML -------------------------
<root>
<person>
<firstname></firstname>
<lastname></lastname>
<address></address>
</person>
<details>
<age></age>
<length></length>
</details>
</root>
Data XML ------------------------------
<root>
<lastname>Hastings</lastname>
<age>28</age>
</root>
Should parse to (Resulting XML)--------
<root>
<person>
<firstname></firstname>
<lastname>Hastings</lastname>
<address></address>
</person>
<details>
<age>28</age>
<length></length>
</details>
</root>
Any advise would be appreciated!
Cheers!
Chris