As I am not getting any response for this topic posting it here.
Detailed question with the code sample that I have till now: https://stackoverflow.com/questions/66901116/apache-xmlschema-core-xsd-xml-parser-shows-the-root-element-as-parent-for-all-ch
I am trying to parse the XSD using Apache XMLSchema Core. I am able to parse the file and store the Parent and its Child Element information within the HashMap.
Each Child element is stored in the type XmlSchemaElement which also consists of the Parent information of that child element. When I try to see the information related to a child element it shows the root element for all instead of its immediate parent.
For example: In my XSD, RestaurantMenu is the Root element and its immediate children are Food. Also, Food has children's name, price, calories etc. When I see the parent element for name I would expect it to be Food as that's the immediate Parent but during Debug shows the RestaurantMenu as its parent which is a bit confusing.
I wanted to know how can I get the information related to the immediate parent for each element.