Active
Project:
QueryPath
Version:
7.x-2.x-dev
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
23 May 2011 at 22:02 UTC
Updated:
24 May 2011 at 21:19 UTC
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
Comment #1
mbutcher commentedThere 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.
Comment #2
claudiuenache commentedThanks 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