C
C#15mo 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
Spoonfish15mo ago
Spoonfish
Spoonfish15mo ago
this is the xml
n8ta
n8ta15mo 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
Spoonfish15mo ago
HmmCouncilRTX3 thanks this worked very well
Accord
Accord15mo 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
More Posts