Options

[SOLVED]Importing examples from an XML file into RapidMiner Studio

ChikoChiko Member Posts: 26 Maven
edited November 2018 in Help
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.
Tagged:

Answers

  • Options
    ChikoChiko Member Posts: 26 Maven
    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 &amp; occurrences of " by &quot; and occurrences of ' by &apos;
Sign In or Register to comment.