Questions tagged [descendant]

Descendant of a vertex v, in the tree data structure, refers to a vertex that is either a child of v or recursively a descendant of any of the children of v.

A tree, in graph theory, is an undirected graph which has a unique path between any pair of vertices. A tree is called rooted, if one particular vertex is assigned as the root.

A rooted tree induces a partial order, where the root is at the highest level, each vertex connected to the root via an edge are called its children. This hierarchy may continue further down, with each vertex having children of its own.

A descendant of any vertex is, therefore, any vertex that can be reached by traversing from parent to child.

132 questions
0
votes
0 answers

Get all descentants of a node in generic tree

I need to save in an array all the descendant nodes of a given node and the node itself. But these nodes must be in order bottom-up, that is, before the leaves, and then the internal nodes to go back to the node parameter. For now I took this method…
user5346990
0
votes
2 answers

Get 3 branch of each branching node

I want to get the 3rd node of a branching node. Example a b c d e f
user3276223
  • 59
  • 1
  • 8
0
votes
1 answer

pointers to object and descendants in C++

I am working on a simple C++ (under Linux) project, which will have pointers to objects. I have class A, class B which extends A, and class C which extends B. Class C has a method (test) that does not exist in A or B. Is is possible to have a…
TSG
  • 4,242
  • 9
  • 61
  • 121
0
votes
1 answer

How to assign ancestor to descendant type in PHP - class type casting

I am trying to assign an ancestor(A) to descendant(B) type variable and call descendant method on ancestor in PHP but I can't get it working. class B extends A{ public function c(){ echo 'B.c'} } I have tried: Rewriting B constructor class B…
morfrei
  • 23
  • 2
0
votes
1 answer

The Intern - functional tests Finding Element with A Descendant that matches

I am writing a functional test script to find a parent element that HAS a child that can be found, and if a descendant is found, return the parent. For example:

Heading 1

FIRST…

Jon
  • 15
  • 3
0
votes
1 answer

PHP - XPATH request on XML file - childrens and siblings

i have following XML document from which i need to get for each node his childrens ( < KA>/< kod> and < TPV>/< TPV>/...< A> ). For better understanding, here is what i need: | | k11 | VP11 |…
porosman
  • 139
  • 1
  • 2
  • 11
0
votes
1 answer

Undefined error when trying to identify descendant of parent using hasAttribute

I'm trying to determine if an element is a descendant of another elect that has a specific attribute. So far, I have no issue when the value is true, but I get TypeError: undefined is not a function (evaluating 'node.hasAttribute(attribute)') when…
CJT3
  • 2,788
  • 7
  • 30
  • 45
0
votes
0 answers

CSS Descending - Not working in Safari on Mac

i create this page: http://fortune.beejayjayn.de/ If you open it on windows in any browser, everything is working fine. Every Browser except Safari is fine on Mac. If you open the page in Safari 6+ (Edit:after some testing it seems to be a problem…
0
votes
1 answer

Finding an specific node in a XML file

I have a XML with 5 or 6 levels. All nodes has an unique ID. By this ID, I need to find a specif node and create a list showing only the ancestors of this node. I'll try to explain better with codes: That's my XML with all…
Adriano
  • 64
  • 6
0
votes
2 answers

How should grouping be combined properly with child and descendant selectors?

Child and descendant selectors have been leaking to every element on my html structure and I found out that this happens when I combine grouping with it. This affects all elements on the whole document: ul#topnav > li a, a:hover, a:focus{ …
Caio Iglesias
  • 594
  • 9
  • 24
0
votes
2 answers

LINQ to XML filter descendants C#

I have xml that is sent by a third party and I want to validate it. XElement xTree = XElement.Parse(@" Donny
0
votes
1 answer

Zurb Foundation: Set CSS nth-child depending on active size (large, medium, small)

On large screens I want every 7th element to have a certain border. On medium screens I wnt these styles to be applied to every 4th. How can I make my style a descendant of .small, .medium, .large?
Matthias Max
  • 595
  • 1
  • 7
  • 20
0
votes
1 answer

Getting atrributes from child's descenant

So I have this code that's supposed to make my xml file read out each descendant element's attribute after selecting the previous element. Here's the xml I'm using -
0
votes
1 answer

get the xmlnodes from soap response whose child node value is 1 using descendant and name()

Hi all I this xml soap response below coming from a webservice ,what I need is to get the xmlnodelist where Treatmenttype = 1 under "IncomingApplications" parent node , I have acheived to get a xmlnodelist of all "IncomingApplications" by use of…
Danyal
  • 13
  • 1
  • 5
0
votes
1 answer

Jquery what is the difference between .find and simply a space between ancestor and descendant?

$("div .product"); selects elements with class of product that have a div ancestor $("div").find(".product"); does the exact same as far as I can see. Both work fine for me. I would like to know which I should use, in order to streamline my code?
1 2 3
8
9