logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Coding & Scripting Corner View previous topic :: View next topic
Reply to topic   Topic: Apache XMLSchema core parser shows wrong parent element
Author
BATMAN_2008



Joined: 30 Mar 2021
Posts: 2
Location: India

PostPosted: Thu 01 Apr '21 11:34    Post subject: Apache XMLSchema core parser shows wrong parent element Reply with quote

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.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7288
Location: Germany, Next to Hamburg

PostPosted: Tue 22 Feb '22 12:52    Post subject: Reply with quote

Did StackOverflow solve your question?
Back to top


Reply to topic   Topic: Apache XMLSchema core parser shows wrong parent element View previous topic :: View next topic
Post new topic   Forum Index -> Coding & Scripting Corner