nodes

Deleting xml nodes using xslt

Hello, Does anyone know how to copy only the first n nodes in a xml file and delete the rest using xslt? So say I only want to copy the first 10 nodes and delete the rest of the nodes that belong to the same parent. Thanks in advance! ...

Connecting nodes to multiple dates

I have company website, with many offices around the world (around 50 offices). The company want to create a gift giveaway with the employees in a specific company each specific day. For example: Office 1: will do the giveaway the days: 1/1/2010, 7/1/2010, 15/1/2010, etc... Office 2: the days: 2/1/2010, 9/1/2010, 19/1/2010, etc... Offi...

natural 'water' flow through web of nodes.

Hopefully this will be clear enough. I have a 2d map made of tiles, and I want "water" to travel through this map. It comes out of a pipe onto a specific tile, and then needs to fill up, like water, all the tiles to reach a certain other tile. I currently have the map inputted into the game with each tile being a node and each node ha...

Rich tree structures with PHP

I'm finding it very difficult to find anything about creating maintanable, navigatable and verbose tree structures in PHP. I wanted to open it up to the SO community and see who's done what. The way I can see creating this sort of structure is to have an object for every node, with a reference to the parent or child nodes. I've yet to p...

Drupal anonymous user permissions problem

I have been wracking my brain on how to solve this issue for hours now, and I know I'm not the first one to encounter it. I am having trouble granting anonymous users access to node content in Drupal 6.15. I have tried everything, including inserts to MySQL, checking and double-checking every permissions setting available (yes, I have e...

is there anyway to have images as the nodes in microsoft glee

i see this post but i can't figure out any way to have a node represented as an image and have the text be a label below the node. Does anyone know if this is possible using Microsoft GLEE? ...

PHP: Using simplexml to loop through all levels of an XML file

I have a function which uses simplexml to return the first level of nodes in an XML file and write it into an unordered list: function printAssetMap() { $xml = simplexml_load_file(X_ASSETS); $assets = $xml->asset; $html = '<ul>'."\n"; foreach ($assets as $asset) { $html .= '<li id="asset'.$asset->asset_assetid.'"...

Using XSLT to compare two nodes and emit XML containing attribute indicating whether value was updated, added, or deleted

Been programming front-end languages for a long time and I rarely encounter XSLT on a project. Well, here it is... We currently have some functions in our XSLT file that are comparing nodes and emitting XML that contains something like previousValue="Old value". This feature helps our users understand what changed when viewing the for...

How to add nodes to a dijit tree on the fly

Basically what I have is a tree with 3 nodes, created like so: for (var i=0; i<response.length; i++) { response[i]["type"] = "project"; } var data = { "identifier": "name", "label": "name", "items": response }; var store = new dojo.data.ItemFileRea...

JavaScript: DOM text nodes

Take a look at the snippet below. Does it create a text node for the string "test" in the DOM? Can I select that node with jQuery for MooTools? <div id="foobar"> test <img /> </div> ...

Drupal - Counting data in nodes, creating custom statistics

Hiya, I'm building some custom content types to capture customer data on a website. Admins will enter the data, users will be able to view it, but I also need to be able to bolt on some statistics and infographics to the data. The problem I have is that I can't see any simple way of doing this within Drupal. Are there modules which ca...

How to print out a BST in C++

My C++ program creates a binary search tree. I know how to print out the values in pre-order, post-order, and in-order. However, I want to do something a little more difficult. I want to print out the values the way they would look if someone drew the tree on paper. It would have the root at the center at the top, it's left child rig...

DOM node child collections--what's the difference?

What's the difference between the children and childNodes collections of a node? And childElementCount and childNodes.length? ...

Get the clicked JSON element's value with ExtJS

I have a JSON store: var jsonstore = new Ext.data.ArrayStore({ fields: ['bla', 'blubb'], data: [ ['bla', 'blubb'], ['blabla', 'blublu'], ['blass', 'hallo'], ['bam', 'guckt'] ] }); and an extjs listview: .... ,{ xtype: 'listview', name: 'abrufliste', store: jsonstore, ...

Java - changing the value of a raw type variable. Possible?

I'll start by saying I am a Java (/programming) newbie and this is my first question on the website. Just learnt how to make an ordered list in Java using recursive nodes. Everything was easy until I ran into this exercise asking me to write a method that would double whatever value is contained in each node. Here is the code I tried to...

How dangerous is this sql query?

The query: UPDATE node as n right join content_type_product as c on n.nid = c.nid right join uc_products as p on p.nid = n.nid set c.field_product_price_eur_value = p.sell_price * 0.0961, c.field_product_price_zar_value = p.sell_price * 1, c.field_product_price_gbp_value = p.sell_pric...

Can PHP SimpleXML be used for this task?

I'm looking to run some kind of loop on some optional XML data. Nodes would potentially look like this: <link1> <url>http://www.bleh.com&lt;/url&gt; <text>Click here</text> </link1> <link2> <url>bleh.com</url> <text>Click here</text> </link2> What would be the best method to determine if these nodes exist and parse them according...

DX TreeList - How to chango color of some Node

Hello, i have DX treeList, it has some functionality like copy, paste, delete and so on. How to do in C# code, to change some Node color to change to some other color? ...

PHP tree implementation: Accessing parent node

I have an own Tree object implemented in PHP. Say we have a tree like: Root |_ Folder 1 |_ Folder 2 |_ Subfolder 1 I can access Subfolder 1 like this: $sf1 = $Tree->NavigateTo("Folder 2/Subfolder 1") And $sf1 will hold the Subfolder 1 node. I want to implement a GetParentNode() method, so that $parent = $sf1->GetParent...

PHP tree implementation: Defining parent reference on recursion loop

Back to my JaxpTree object. The tree is supposed to convert a MySQL related-table pair into a nested tree that follows such relationship: /** * Generates a JaxpTree structure. Parameters are used by the recursive * function. Normally, they shouldn't be specified. * * @param int $parent_id * @param s...