In a tree data structure, the root node is a node with no parent, but which typically has children.
Questions tagged [root-node]
36 questions
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…

Ashreet Sangotra
- 15
- 1
- 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…

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…

Arnold Pistorius
- 522
- 4
- 18
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
- 76,472
- 17
- 159
- 346
0
votes
0 answers
xmltreeparse creates an object that, when indexed, crashes R Studio (Posit) cloud
I am taking a course that includes learning how to read XML files into R. I'm trying to read this XML document into an R object:
https://d396qusza40orc.cloudfront.net/getdata%2Fdata%2Frestaurants.xml
When I follow instructions I'm given, it creates…

kswp
- 35
- 3
0
votes
1 answer
Removing Root Node in Binary Search Tree
I'm currently unable to delete the root node of my binary search tree in these situations
the root node doesn't have a left attribute or doesn't have a right attribute
the root has neither attribute (leaf)
from __future__ import…
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
- 3
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…

Cudzie Mavhunga
- 1
- 3
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…

Sourav Kondapaka
- 53
- 1
- 3
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,868
- 1
- 25
- 45
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