xpath
denhojer
New Altair Community Member
Hi al
In rapid miner i am trying to take data using xpath from an xml page, i have tried a number of different statements listed below but no success.
Below is the data that im trying to retrieve, i want all the features from the un-ordered list.
Thanks.
In rapid miner i am trying to take data using xpath from an xml page, i have tried a number of different statements listed below but no success.
Below is the data that im trying to retrieve, i want all the features from the un-ordered list.
I would be greatful if somebody help me out with my problem.
<div id="features">
<h3>Features:</h3>
<ul><li>Front garden</li>
<li>Rear Large Shed</li>
<li>Superb condition and tastefully decorated</li>
<li>Energy Efficent with a B2 Ber rating</li>
<li>Gravel & driveway</li>
</ul></div>
Thanks.
Tagged:
0
Answers
-
Here is the configuration of the "Read XML" operator which works for the data you have posted:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.3.005">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="5.3.005" expanded="true" name="Process">
<process expanded="true">
<operator activated="true" class="read_xml" compatibility="5.3.005" expanded="true" height="60" name="Read XML" width="90" x="45" y="30">
<parameter key="file" value="/home/marcin/temp/forum.xml"/>
<parameter key="xpath_for_examples" value="//div[@id='features']/ul/li"/>
<enumeration key="xpaths_for_attributes">
<parameter key="xpath_for_attribute" value="text()"/>
</enumeration>
<list key="namespaces"/>
<parameter key="use_default_namespace" value="false"/>
<list key="annotations"/>
<list key="data_set_meta_data_information">
<parameter key="0" value="Attribute.true.polynominal.attribute"/>
</list>
</operator>
<connect from_op="Read XML" 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>0