Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You didn't really specify how you need to pull this data or where it is going, but perhaps this will help:</p> <p>I saved your example xml as follows:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt; &lt;div id="features"&gt; &lt;h3&gt;Features:&lt;/h3&gt; &lt;ul&gt;&lt;li&gt;Front garden&lt;/li&gt; &lt;li&gt;Rear Large Shed&lt;/li&gt; &lt;li&gt;Superb condition and tastefully decorated&lt;/li&gt; &lt;li&gt;Energy Efficent with a B2 Ber rating&lt;/li&gt; &lt;li&gt;Gravel &amp;amp; driveway&lt;/li&gt; &lt;/ul&gt;&lt;/div&gt; </code></pre> <p>I then created the following RapidMiner process which pulls each list element as an individual attribute:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt; &lt;process version="5.3.005"&gt; &lt;context&gt; &lt;input/&gt; &lt;output/&gt; &lt;macros/&gt; &lt;/context&gt; &lt;operator activated="true" class="process" compatibility="5.3.005" expanded="true" name="Process"&gt; &lt;process expanded="true"&gt; &lt;operator activated="true" class="read_xml" compatibility="5.3.005" expanded="true" height="60" name="Read XML" width="90" x="112" y="165"&gt; &lt;parameter key="file" value="path/to/Test.xml"/&gt; &lt;parameter key="xpath_for_examples" value="//h3"/&gt; &lt;enumeration key="xpaths_for_attributes"&gt; &lt;parameter key="xpath_for_attribute" value="//li[1]/text()"/&gt; &lt;parameter key="xpath_for_attribute" value="//li[2]/text()"/&gt; &lt;parameter key="xpath_for_attribute" value="//li[3]/text()"/&gt; &lt;parameter key="xpath_for_attribute" value="//li[4]/text()"/&gt; &lt;parameter key="xpath_for_attribute" value="//li[5]/text()"/&gt; &lt;/enumeration&gt; &lt;list key="namespaces"/&gt; &lt;parameter key="use_default_namespace" value="false"/&gt; &lt;list key="annotations"/&gt; &lt;list key="data_set_meta_data_information"/&gt; &lt;/operator&gt; &lt;connect from_op="Read XML" from_port="output" to_port="result 1"/&gt; &lt;portSpacing port="source_input 1" spacing="0"/&gt; &lt;portSpacing port="sink_result 1" spacing="0"/&gt; &lt;portSpacing port="sink_result 2" spacing="0"/&gt; &lt;/process&gt; &lt;/operator&gt; &lt;/process&gt; </code></pre> <p>I think the XPATH query you are looking for is "//li[n]/text()" where n is the number of the node from which you are trying to pull data. I hope this helps!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload