node

Simplexml is giving me the wrong results

I have a simple xml below: <?xml version="1.0" encoding="utf-8"?> <catalogue> <category name="textbook" id="100" parent="books"> <product id="20000"> <author>Gambardella, Matthew</author> <title>XML Developer's Guide</title> <genre>Computer</genre> <price>44.95</price> <publish_date>2000-10-01</publis...

Drupal-6: What's wrong this this node?

I have some nodes that I have manually written to the database. (Don't ask why; it's easier than other options.) They show up fine on the Content List at http://www.domain.com/admin/content/node/overview. However, when I go to that node's page (http://www.domain.com/node/2582/view, where 2582 is the nid of the node in question), I get a ...

Drupal: How to retrieve parent page's $node variable in a block using module_invoke()?

Hi, I'm using module_invoke() to include a block and I need in this block to read a value contained in my parent content type page. So how can I get the $node variable in my block from the view? Code I'm using: <?php $block = module_invoke('my_blocks', 'block', 'view', 7); print $block['content']; ?> Now I need to access $no...

How to get the next text of an XML node, with C# ?

Hello, I have the following XML. Given the classname, I need to get its corresponding colorcode. How can I accomplish this in C# ? Otherwise said, I have to get to a specific node, given its previous node's text. Thank you very much <?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?> <?xml-stylesheet type='text/xsl' href='templ...

Drupal: Add onchange code to option_widgets in form_alter?

Do anyone know how I can add the following to form_alter? Currently I've got two integer cck fields which are populated from sql using the php values command. One field is for make, and the other is for model. Both makes and models are their own node types. Model has a node reference to make. What I want to do on the Make drop down (CC...

Digester: Extracting node name

Hi Guys, Is it possible to extract the node name using apache digester? So, if the xml looks like <furniture> <sofa> ..... </sofa> <coffeeTable> ..... </coffeeTable> </furniture> is it possible to extract the node name "sofa", "coffeeTable"? I know it is possible using xpath but is it possib...

How do I send a module to an Erlang node?

I have several nodes running in an erlang cluster, each using the same magic cookie and trusted by each other. I want to have one master node send code and modules to the other nodes. How can I do this? ...

Do XPath on a Node with Java

I have someNode and I'd like to do XPath on it like this: XPath xpath = XPathFactory.newInstance().newXPath(); XPathExpression expr = xpath.compile("//name"); Object result = expr.evaluate(SOMETHING_ELSE, XPathConstants.NODE); How can I turn someNode to SOMETHING_ELSE and do my XPath? ...

Drupal: Associating grouping more than one CCK field.

I have an article content type with a node reference CCK field that links to other articles (related articles) . I need to add a text field for each node reference that allows an admin to specify "why it's related". How do I go about this in D6? Articles can be related with other articles so it makes sense to have the "why it's relat...

algorithm to get result like taxonomy_get_tree(). But retrieve only non empty terms.

Hi, I need to get an associated array of terms in drupal that has node associated with it. However, I can't seem to figure it out the appropriate algorithm. What I want is something like taxonomy_get_tree(). But, only term that has associated node with it. ...

Why does my C++ code fail to delete all nodes in my BST?

This is supposed to traverse a BST and delete every node, including the root node. However, at the end, I get the message "root still has a left node." Why aren't all nodes deleted? void deleteTree() { deleteNode(root); if(root->right) cout << "root still has a right node" << endl; if(root->left) cout <<...

Wrap XmlNode with tags - C#

I have the following xml: <span>sometext</span> and I want to wrap this XmlNode with another tag: <p><span>sometext</span></p> How can i achieve this. For parsing i use XmlDocument (C#). ...

[Drupal] How do I give a specific user editing rights to a specific node?

How do I give a specific user editing rights to a specific node? I have a user role named "Student". Multiple users have that role, only a few of them can edit a node. How can I realise this? ...

Fixing pointers in binary tree delete function (node with 2 children)

Hi, I'm a having a little trouble thinking how the hell do I fix the appropriate pointers when trying to delete a node from a binary tree where that node has 2 children. I understand the basic concept and I'm basically just having trouble fixing the pointers... So, basically, my delete function is mostly done and every case is already...

C++ Linker Error involving operator overload function

I have a List of type Node. I want to set a temporary Node equal to the Node at the front of the List but I keep getting a Linker Error: class Node { public: Node(); Node& operator = (const Node& n); }; 1>Linking... 1>main.obj : error LNK2019: unresolved external symbol "public: class Node & __thiscall Node::operator=(...

Drupal and Comment Form

I need to insert the comment form directly to the node template (I use node-type.tpl.php to theme the node-type). In related issue, if I go to /comment/reply/NID I get the comment form, but it's got only "preview" button, and no submit button. the Preview button does nothing when pressed on. Thanks for the help! ...

Which TCP port does Erlang use for connecting to a remote node?

I need to open a firewall port so that I can connect from one Erlang node to another. Is there a standard port? ...

Delphi Delete TNode, incompatible type TNodePtr.

I have a binary tree class that is created with a root node and nodes can be added to it as needed in the code, however I am having trouble in deleting the nodes because I point to them with TNodePtr and it is an incompatible type with TNode. At the moment I have this recursive method of deleing nodes which should work once the incompati...

ANTLR: multiplication omiting '*' symbol

I'm trying to create a grammar for multiplying and dividing numbers in which the '*' symbol does not need to be included. I need it to output an AST. So for input like this: 1 2 / 3 4 I want the AST to be (* (/ (* 1 2) 3) 4) I've hit upon the following, which uses java code to create the appropriate nodes: grammar TestProd; options...

Publishing a node to a specific page ?

Hello I have created a new content type "Quote". Now the user should be able to link a specific "Quote" to a specific page where the user wants the quote to be shown. Is this possible? thx ...