Hi all, I have to transform a XML file like this:
<?xml version="1.0"?>
<vocabulary>
<voc_id>102</voc_id>
<name>Vocabulary Name</name>
<description>Voc description</description>
<relations>3</relations>
<hierarchy>5</hierarchy>
<word>
<word_id>1</word_id>
<voc_id>102</voc_id>
<name>foo1</name>
<description>word description</description>
<parent>0</parent>
<synonyms>
syn1
syn2
syn3
</synonyms>
</word>
<word>
<word_id>2</word_id>
<voc_id>102</voc_id>
<name>foo2</name>
<description></description>
<parent>1</parent>
</word>
</vocabulary>
in order to have a word structure like this:
<skos:Concept rdf:about="http://www.example.com/concepts#word_id">
<skos:prefLabel>name</skos:prefLabel>
<skos:altLabel>syn name1</skos:altLabel>
<skos:altLabel>syn name2</skos:altLabel>
<skos:broader rdf:resource="http://www.example.com/concepts#parent1"/>
<skos:broader rdf:resource="http://www.example.com/concepts#parent2"/>
<skos:definition>description</skos:definition>
</skos:Concept>
How can I write a script for my goal?
Thank you in advance!