[SOLVED]Importing examples from an XML file into RapidMiner Studio
Chiko
New Altair Community Member
Hi,
I am attempting to read examples from an XML data file in RapidMiner studio by using the Read XML operator. If I test the input file with just a single example, the import works fine(i.e one <review>....</review>). However, the minute I increase the number of examples to 2, I am however encountering the following error:
XML Error: The markup in the document following the root element must be well formed. The format of the XML file is along these lines:
<review>
<unique_id>1234
</unique_id>
<unique_id>xyz1234
</unique_id>
<product_name>
</product_name>
....
</review>
....
In short I have many reviews in one XML file and it is impractical to try and import each of them individually.
Thanks in advance.
I am attempting to read examples from an XML data file in RapidMiner studio by using the Read XML operator. If I test the input file with just a single example, the import works fine(i.e one <review>....</review>). However, the minute I increase the number of examples to 2, I am however encountering the following error:
XML Error: The markup in the document following the root element must be well formed. The format of the XML file is along these lines:
<review>
<unique_id>1234
</unique_id>
<unique_id>xyz1234
</unique_id>
<product_name>
</product_name>
....
</review>
....
In short I have many reviews in one XML file and it is impractical to try and import each of them individually.
Thanks in advance.
0
Answers
-
for others benefit, it turns out that the input XML file had special characters in it, so all I had to do was to replace all occurrences of & by & occurrences of " by " and occurrences of ' by '0