-
modify XML file
I have XML file which is generated by Rapidminer. So I need to change some attributes in XML file to variables.This is the file:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
- <process version="5.1.006">
- <context>
<input />
<output />
<macros />
</context>
- <operator activated="true" class="process" compatibility="5.1.006" expanded="true" name="Process">
- <process expanded="true" height="-20" width="-50">
- <operator activated="true" class="retrieve" compatibility="5.1.006" expanded="true" height="60" name="Retrieve" width="90" x="82" y="118">
<parameter key="repository_entry" value="Golf" />
</operator>
<connect from_op="Retrieve" from_port="output" to_port="result 1" />
<portSpacing port="source_input 1" spacing="0" />
<portSpacing port="sink_result 1" spacing="0" />
<portSpacing port="sink_result 2" spacing="0" />
</process>
</operator>
</process>
So I need to change "Golf" to a string variable i think.
-
I figured out approaches to parse and modify XML file using DOM algorithm, appreciate your concern.:)