In a tree data structure, the root node is a node with no parent, but which typically has children.
Questions tagged [root-node]
32 questions
14
votes
4 answers
PHP5: Find Root Node in DOMDocument
I have a PHP5 DOMDocument and I try to find the root node (not the root element).
Example:
x
x
y
y
…
![](../../users/profiles/999.webp)
BlaM
- 26,721
- 31
- 89
- 104
12
votes
3 answers
C# Xml serialization, collection and root element
My app serializes objects in streams.
Here is a sample of what I need :
In this case, the object is a collection of 'links' object.
-----------First…
![](../../users/profiles/43188.webp)
Mose
- 1,671
- 3
- 15
- 33
9
votes
1 answer
What is level of root node in a tree?
Some articles say level of a root node is 0 whereas some say it's 1.
From https://www.gatevidyalay.com/tree-data-structure-tree-terminology/
In a tree, each step from top to bottom is called as level of a tree.
The level count starts with 0 and…
![](../../users/profiles/12472216.webp)
Okokok
- 91
- 1
- 3
9
votes
2 answers
WPF TreeView bound to ObservableCollection not updating root nodes
Sorry - my question is almost identical to this one but since it didn't receive a viable answer, I am hoping that someone else has some fresh ideas.
I have a WPF TreeView that is bound to a hierarchy of a single type:
public class Entity
{
…
![](../../users/profiles/168614.webp)
Tim Coulter
- 8,323
- 10
- 60
- 88
4
votes
4 answers
XPath/XQuery: Select a root node with its attributes without childs
I have an xml:
I would like to select ONLY a root node with its attributes without its child nodes:
Is such thing possible with XPath?
![](../../users/profiles/357555.webp)
Timofey
- 2,350
- 2
- 33
- 50
4
votes
2 answers
wxPython TreeCtrl without showing root while still showing arrows
I am making a python tree visualizer using wxPython. It would be used like so:
show_tree([ 'A node with no children', ('A node with children', 'A child node', ('A child node with children', 'Another child')) ])
It worked fine but it shows a root…
![](../../users/profiles/318578.webp)
None
- 3,427
- 5
- 38
- 65
3
votes
1 answer
Copy XML file contents except for root node and attribute XSLT
I am working on a small XSLT file to copy the contents of an XML file and strip out the declaration and root node. The root node has an namespace attribute.
I currently have it working except for now the namespace attribute is now being copied to…
![](../../users/profiles/1438009.webp)
RXC
- 1,173
- 4
- 31
- 64
3
votes
5 answers
should a tree have exactly one root node
I want to display a tree structure. Do i really need to give the user/tree a predefined hardcoded root node like "RootUnit" where he can add his children or descendants?
Does this make sense or cause only trouble when adding nodes?
![](../../users/profiles/401643.webp)
Pascal
- 10,107
- 18
- 83
- 180
2
votes
1 answer
how to get value of a specified node in XML tree using R language
i have a xml file that includes rootNode and child node with attributes that handle values.
i am using the R language to work on the xml file.
what i need is to display the result of the employees that are in the department IT
how to display the ID…
![](../../users/profiles/9162690.webp)
Ghgh Lhlh
- 93
- 1
- 1
- 12
2
votes
1 answer
Neo4j cypher - Counting immediate children of root nodes
I'm struggling with a problem despite having read a lot of documentation... I'm trying to find my graph root node (or nodes, they may be several top nodes) and counting their immediate children (all relations are typed :BELONGS_TO)
My graph looks…
![](../../users/profiles/639259.webp)
Romain Bruckert
- 2,167
- 21
- 49
2
votes
2 answers
Root immediate child nodes icons not visible when hiding root
I have a JTree structure as shown below. I have Icons that appear whenever a node has child nodes, which is working properly.
My problem is that I need to hide the ROOT node. When I hide the ROOT node, the Icons for MainTop1 and MainTop2 nodes are…
![](../../users/profiles/466410.webp)
Marquinio
- 3,993
- 10
- 41
- 62
1
vote
1 answer
How to access (PortalSiteMapNode) RootNode outside the SiteMapProvider?
A very simple question for experienced sharepoint developers I think.
Inside a PortalSiteMapProvider I can access the RootNode this way:
(PortalSiteMapNode) RootNode
My Question is, how can I access this node from other places, without a reference…
![](../../users/profiles/999342.webp)
LMW-HH
- 1,153
- 2
- 14
- 31
1
vote
1 answer
Why can't we initiate the root node randomly in Decision Trees?
I just got into learning about Decision Trees. So the questions might be a bit silly.
The idea of selecting the root node is a bit confusing. Why can't we randomly select the root node? The only difference it seems to make is that it would make the…
![](../../users/profiles/2399367.webp)
Ashreet Sangotra
- 15
- 5
1
vote
1 answer
how to change root node wcf request\response
I am calling a Java webservice which I am trying to call from WPF client using Gateway and message inspector. The problem I am facing is -- Java webservice requires the root node of request xml as element, however my WCF request (When i am…
![](../../users/profiles/706225.webp)
Dharmesh Pandya
- 33
- 7
1
vote
2 answers
How to Deserialize a XML response when the root node is a string in C#
The Microsoft Cognitive Text Translator API gives a response in the following format:
nl
I was trying to deserialize it with the following code:
var serializer = new…
![](../../users/profiles/1614580.webp)
Arnold Pistorius
- 502
- 4
- 16