C
C#2y ago
Spoonfish

❔ xml reading problems with duplicate element names

im trying to read a xml style map file and it has multiple groups elements of 'object' which all have different attributes. I only want to read through the objects in one objectgroup at a time anyone know how to do that?
5 Replies
Spoonfish
SpoonfishOP2y ago
Spoonfish
SpoonfishOP2y ago
this is the xml
n8ta
n8ta2y ago
Could you use ReadSubtree on the objectgroups and then iterate over the objects https://learn.microsoft.com/en-us/dotnet/api/system.xml.xmlreader.readsubtree?view=net-8.0
XmlReader.ReadSubtree Method (System.Xml)
Returns a new XmlReader instance that can be used to read the current node, and all its descendants.
Spoonfish
SpoonfishOP2y ago
HmmCouncilRTX3 thanks this worked very well
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server