» Home » nodes » Page 1
How to loop through a list of nodes and create new nodes based on the child nodes of those I'm looping through
by kevotheclone in Development Tools & Services

This may be a basic question but this newbie has been struggling and Googling and hasn't been able to figure it out.


I have an xml document similar to this.


<x99:events xmlns:x99="http://www.foo.com/x99" xmlns:xl="http://www.w3.org/1999/xlink" pubdate="2012-05-29T11:14:14-06:00">
<x99:event xl:href="event.xml?event_id=255918" id="foo" status="new"

Removing text nodes from element nodes but not from attribute nodes type
by Bulk Beef in Web Design

How to remove or empty all text nodes from all element nodes but not from attribute nodes in a HTML file with PHP5 DOM? The outputted HTML must contain all the tags and attributes (with the text nodes, that represent the attributes value, untouched) as the original file but with no text, like an empty HTML template.


Copy XML while excluding parent nodes, removing specific child nodes, and overwriting some child nodes
by Enar in Development Tools & Services

I've reviewed several posts doing these things separately, but have yet to combine them all together successfully.


I have an input similar to this structure:


<Response>
<Confirmation>Success</Confirmation>
<SecondResponse>
<InquiryResponse>
<ID>99999</ID>
<Confirm

Remove nodes and child nodes from an XmlDocument Object based on attribute match
by Ansari in Programming Languages

I have an xml file with Hierarchical data I am loading that into XmlDocument object all is well until now, what I want to do now is remove all nodes and child nodes except the one that have an attribute of


AssetSysID="6288"


I am unsure of how to achieve this task any help is appreciated. Code for binding data to treeview:


XmlDataSource xDS = new XmlDat

jsTree - Check and disable child nodes on selecting parent nodes, but not the other way round
by Josh Tegart in Web Design

I am using jsTree jQuery plugin to render a tree structure. I am using the two_state property, which allows me to select the parent and child nodes independently.


My issue is that I need to select and disable all the child nodes of a parent if the parent is selected, but if a child node is selected the parent should not be affected.


Thanks in advance. Please let me kno


Recursive Query - Only select nodes where leaf nodes represent active data
by Stringjam in Databases

Given the following recursive query:


WITH DepartmentHierarchy (DepartmentID, Name, IsInactive, IsSpecial, ParentId, HierarchyLevel) AS
(
-- Base case
SELECT
DepartmentId,
Name,
IsInactive,
IsSpecial,
ParentId,
1 as HierarchyLevel
FROM StoreDepartment
WHERE ParentId IS NULL

how to select two nodes (pairs of nodes) randomly from a graph that are NOT connected, Python, networkx
by NAM TRON in Programming Languages

I want to extract two nodes from a graph, the catch being that they shouldnt be connected i.e. no direct edge exists between them. i know i can get random edges using "random.choice(g.edges())" but this would give me random nodes that are connected. I want pairs of nodes that are NOT connected (a pair of unconnected edges). help me out guys...thanx


how to find all the child nodes inside the matched elements (including text nodes)?
by OGG in Programming Languages

in jquery its quite simple


for instance


$("br").parent().contents().each(function() {

but for nokogiri, xpath,


its not working out quite well


var = doc.xpath('//br/following-sibling::text()|//br/preceding-sibling::text()').map do |fruit| fruit.to_s.strip end

Drupal: search for comment nodes, and display results with parent nodes?
by coding-style in Web Design

I've created a (modest) question answers system in Drupal.


I'm using forum content type and enabled comments on nodes. I'm also using node comments module to convert comments to nodes.


Everything works great, I still have a small issue on the "Search" View. When I search for a word, the search engine displays all nodes containing that word.


However, if the no


Closure table Root Nodes Query performance with 10s of millions of nodes
by jwright30 in Databases

I currently have a closure table used for hierarchical data that has 5 million nodes which results in ~75 million rows in the closure table. Using SqLite my query time is rising exponentially due to the size of the closure table.


CREATE TABLE `Closure` (`Ancestor` INTEGER NOT NULL ,`Descendant` INTEGER NOT NULL ,`Depth` INTEGER, PRIMARY KEY (`Ancestor`,`Descendant`) )
CREAT

Next
Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2014 © bighow.org All Rights Reserved .