Questions tagged [root-node]

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

32 questions
1
vote
1 answer

Retain single root node definition while using derived elements substitution

In an XSD schema, you cannot declare an element as the only valid root node for your document. It's a PITA, but I'm aware about it. For ages I would simply do what is suggested in the linked answer -- only define s and s,…
GSerg
  • 71,102
  • 17
  • 141
  • 299
0
votes
1 answer

How to add multiple child nodes to a tree

I'm working on a project to create a tree with more than 2 child nodes. I get that when creating a binary tree, we can just create a left node and a right node to act as children, but when I've looked online for help in creating a tree, every…
0
votes
2 answers

How to delete root node as part of full tree deletion

I am making a binary search tree that has a function that is deleting all nodes in the tree. When called later on it seems all nodes are being deleted but the root node. Before adding the conditionals to the code below there were also other nodes…
roberts4
  • 1
  • 2
0
votes
1 answer

How to delete root nodes of XML strings in R

I want to combine multiple XML strings (> 1000) into one string in R. This can for example be done by the XML package (xml_add_sibling). However I would like to get rid of the intermediate root nodes ("positions" in my example). Input: library(XML) …
Thomas
  • 1
0
votes
1 answer

function only placing 1 arkit object Node on scenview (Swift4)

My code below is supposed to place a user created arkit object in the scenview however its not working. It Places 1 object and can not place any more other objects. The code I commented out places scn shape balls perfectly and as many as the user…
user10764035
0
votes
1 answer

Create a k-ary tree from a list of coordinates and list of edges connecting them.

I have a list of Nodes/Vertices, and a list of lines/edges connecting these nodes.The lists are not sorted or ordered in any way, but contain all the edges and nodes for a particular data set. The edges are line segments defined by Cartesian…
0
votes
2 answers

Unable to get root node value from True. Instead gives the last nodes' value

I have a public class Q5 which has a nested private static class BinTree. In main I create q5 object and give 3 nodes to add to the tree. When I try to get the value of the root it returns the value of the last node.(here it should be returning 1…
0
votes
0 answers

Deleting the root node of a BST

I'm trying to make a remove function (without the use of recursion), that passes in the value of the node I want to remove. My current problem is that my destructor seems to be making the program crash (getting a runtime error), which is probably…
Reclaim
  • 3
  • 1
0
votes
1 answer

XSD for alternative root elements from different namespaces?

XML Schema V1.0 can specify alternative root nodes for instances by way of the fact that there is no single root node definition: https://stackoverflow.com/a/8857777/8254682 So it's possible to leverage this to provide a kind of "document type…
Michael
  • 95
  • 6
0
votes
1 answer

Add root element to repeated nodes in XML file using XSL

I have XML file has repeated nodes, But don't have root element as the following: AAA BBB CCC I wanna generate XML with root as the following:
Mohamed Yakout
  • 2,498
  • 20
  • 42
0
votes
0 answers

Java appendChild (CSV to XML conversion) doesn't work for ONE node

So I need to convert a CSV file to seperate XML files (one XML file per line in the CSV file). And this all works fine, except for the fact that it refuses to add one value. It adds the other without a problem, but for some mysterious reason refuses…
AmyLinck
  • 3
  • 6
0
votes
1 answer

Tree class root node not updating

I'm trying to write an AVL Tree class in C++ and im starting by just writing code for a normal BST but I have a problem. The problem I'm having is with my insert function. I try to insert elements into the tree it doesn't seem to actually do it. I'm…
Esteban D
  • 59
  • 3
0
votes
1 answer

jsoncpp empty root node with comment

Using jsoncpp, if I use the following code, I get a root node with a comment and a Json::ValueType of nullValue: std::string somejson("// Configuration options\ {\ // Default encoding for text\ \"encoding\" : \"UTF-8\",\ \ // Plug-ins loaded at…
0
votes
1 answer

Root node in a tree should be expanded by default

I need only Root node to be expanded by default. Can anybody help me with this. Following is the HTML and Jquery. It has a expand and collapse functionality. When u click on text in a tree it will expand and collapse. I have added in JSFiddle…
Gowthamr.cs
  • 141
  • 2
  • 11
0
votes
1 answer

JavaFX8 tree table view custom root row

In my tree-table-view I have a root item which contains child items(I have mistakenly called them root items) that in turn have child items. I need to customize those mistakenly called root items rows text appearance. Is there such a selector or…
Mike Spike
  • 317
  • 7
  • 18