Questions tagged [root-node]

In a tree data structure, the root node is a node with no parent, but which typically has children.

36 questions
15
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
BlaM
  • 28,465
  • 32
  • 91
  • 105
12
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 { …
Tim Coulter
  • 8,705
  • 11
  • 64
  • 95
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…
Mose
  • 1,781
  • 3
  • 16
  • 35
11
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…
Okokok
  • 111
  • 1
  • 4
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?
Timofey
  • 2,478
  • 3
  • 37
  • 53
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…
None
  • 3,875
  • 7
  • 43
  • 67
3
votes
2 answers

Multiple root nodes in Alpine.js

Building a data table with the latest Alpine.js (v3.7.0). Ran into a problem when trying to implement child rows (i.e an additional togglable row under the main/parent row). Simplified version: