I am trying to use Nokogiri to parse my XML which is I am getting from an URL, but I am not able to create an array of it so that it would be accessible all over the project.
My XML:
<component name="Hero">
<topic name="i1">
<subtopic name="">
<links>
<link Dur="" Id="" type="article">
<label>I am here First. </label>
<topic name="i2">
<subtopic name="">
<links>
<link Dur="" Id="" type="article">
<label>I am here Fourth. </label>
<label>I am here Sixth. </label>
<topic name="i3">
<subtopic name="">
<links>
<link Dur="" Id="" type="article">
<label>I am here Fourth. </label>
I am planning to create an array for each topic, which would contains labels inside it. For example:
hro_array = ["I am here First.","I am here Second.","I am here Third".]