This may sound (and may also be) stupid. I've used querypath as a standalone library and now i'm trying to integrate it with D7.
For some reason i can't figure out where to find some specific examples (the example configuration points to a configuration page).
For example i'm trying to load some external content into a drupal node. My n00b instinct is to setup the querypath object and to assign it to the node object. Is there a more drupal specific way to do this?

Thanks a bunch,
Claudiu

Comments

mbutcher’s picture

There aren't many examples other than the normal QueryPath examples. The main reason is that I haven't yet found a set of things people want to do consistently with QueryPath + Drupal.

If you want to take an XML document and create a node, it takes a little bit of work. You usually have to create the node object, and then specifically assign data from your QueryPath object to the node. This requires a fair bit of knowledge about the structure of nodes, and about the particular fields on your given node type. Here's a good introduction: http://www.group42.ca/creating_and_updating_nodes_programmatically_in_dr...

If you figure it out and feel like writing a quick example (or example module), I'd be more than happy to include it.

claudiuenache’s picture

Thanks so much Matt for all your support. The link provided is very relevant to my problem.
For the moment, I try to build a very custom module to get external data about phone models and insert it in node fields.
When I'll build a general sample, like yours, i will gladly provide it.
Thanks again!
Claudiu