Skip to main content
Hello experts,

 

 

I'm struggling with attributes in XML files. Any ideas on how to get a hold of them would be highly appreciated. In the example below I would like to retrieve the value 766 of attribute ANR.

 

 

<?xml version="1.0" encoding="ISO-8859-1"?> <Eiendommer>             <Skatteeiendom ANR="766">             </Skatteeiendom> </Eiendommer>

 

Thank in advance!

 

Jasper
Hei Jasper,

 

 

if you're using FME 2012 or newer, the simplest solution is probably to use the generic XML reader in conjunction with feature paths. There is a nice example on fmepedia to get you started.

 

 

Håper det hjelper.

 

 

David
Excellent Norwegian David, but I tried the feature path thing without success... any more ideas anyone?
Hi Jasper,

 

 

Can you provide more info on why it didnt work?

 

Also are you using the flattening options?

 

 

This video explains how to set up the feature paths, hope this helps.

 

 


Flattening and the "add parent ancestor" thing did the trick. Nice. Thanks guys!

Reply