I use xpath //results/result I can map the attributes on result node howver i cannot map fields as they are further down. So i need to transform this xml to simpler format where it is all on level?
So I only want title and body content fields which is what i am pulling down. I am guessing i will need to update this xml via an xslt transform so everything is at one level.
XML import issue
Hello,
So I have xml file with 200 records. I am trying to import that. The format of it looks like:
I use xpath //results/result I can map the attributes on result node howver i cannot map fields as they are further down. So i need to transform this xml to simpler format where it is all on level?
Regards
Ismail
Hi Ismail,
Does any of the fields have mixed content (i.e., text + tags)?
/Chriztian
Just text, the format is news aritcles taken from guardian via their api see https://open-platform.theguardian.com/documentation/search
So I only want title and body content fields which is what i am pulling down. I am guessing i will need to update this xml via an xslt transform so everything is at one level.
regards
Ismail
Alright,
Try this and maybe modify depending on what you need:
/Chriztian
woot i dont have to write too much xslt ftw
That's right :)
Problem is, the
body
field is HTML which is not very well expressed in an attribute.../Chriztian
just updated so its not attribute.
Thanks for the help
Hi Ismail,
Indeed CMSImport expects all to be on one level for a document type.
Best,
Richard
is working on a reply...