2

I have an xml page that I want to import. Although I'm able to successfully import the Title and Body, Im unable to import the published status and promoted-to-front-page settings for the page. Here is what my xml code looks like:

<nodes>
<node>
<Title>This is the Title
</Title>
<Body>
This is the Body
</Body>
<Order>1</Order>
<Path>
/clips/this-is-the-path
</Path>
<Post-date>Tuesday, February 17, 2015 - 09:33</Post-date>
<Promoted-to-front-page>No</Promoted-to-front-page>
<Published>Yes</Published>
</node>
</nodes>

Here are what my Xpath settings look like: Xpath Settings Screenshot

Could anyone suggest what I'm doing wrong here?

3

I suggest installing feeds tamper (https://www.drupal.org/project/feeds_tamper) with this module you can easily convert the yes to a 1 and no to a 0 before saving to the database. This should solve your issue.

  • Thanks for the reference, The only reason I didn't use feeds_tamper was because it was not recommended by few community members online. I have +1'd your post! – OmarAsifShaikh Feb 17 '15 at 20:28
  • Oké thanks a lot, do you have more information on why they wouldn't recommend using it? I used it in the past and I loved it, it also made it easy to create my own custom functionality on how to deal with data before saving to the database. – Fons Vandamme Feb 17 '15 at 20:40
3

Alright, After some search online, I was able to use the innate Xpath functions, so it works with the following expressions: Screenshot of the xpath expressions

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.