0

I'm trying to import an xml-file with apoc.load.xml. Especially I'm trying to get the text in the label-element. Here is my example query:

CALL apoc.load.xml('https://seafile.rlp.net/f/cf1f73f3cbdf413eb14d/?dl=1','',{}, true) yield value as xmlFile
UNWIND xmlFile._register AS register
UNWIND register._lemma AS wdata
RETURN wdata;

How can i reach the content of the label-Element ?

Andreas Kuczera
  • 353
  • 1
  • 2
  • 14

1 Answers1

1

If you just want the label elements, you can use an xpath (/register/lemma/label) in the apoc.load.xml procedure, like that :

CALL apoc.load.xml('https://seafile.rlp.net/f/cf1f73f3cbdf413eb14d/?dl=1','/register/lemma/label',{}, false) yield value as labels
RETURN labels._text
logisima
  • 7,340
  • 1
  • 18
  • 31