Skip to main content

Timeline for XML schema parser

Current License: CC BY-SA 3.0

8 events
when toggle format what by license comment
May 1, 2012 at 17:18 vote accept Mike J
Apr 20, 2012 at 17:37 comment added Winston Ewert @MikeJ, see edit. Basically, your data structure isn't helping you perform any of those tasks. Its actually easy to extract from the original xml document.
Apr 20, 2012 at 17:37 history edited Winston Ewert CC BY-SA 3.0
added 2292 characters in body
Apr 18, 2012 at 19:29 comment added Mike J I added in more of the helper functions I had written and more example function calls to hopefully show a better idea of the how I'm using this data structure.
Apr 18, 2012 at 15:49 comment added Winston Ewert @MikeJ, re code-duplication: upon a second look, I just can't read. To give any better suggestions, I'd have to see how you are using this data structure you are constructing.
Apr 18, 2012 at 15:45 comment added Mike J Hopefully that explains most of the conditions, also why frequently "name" is ignored. The inner class function get_element had to be recursive and check all conditions but you are right, I could parse out some of the logic. You mentioned repeated code but I couldn't find another place where I use that conditional logic in this code segment, am I missing something obvious? I changed "get_Type" to "get_type", original used because the xsd standards for "simpleType" and "complexType" are written like that. Given this, do you have other suggestions on how I could better handle the parsing logic?
Apr 18, 2012 at 15:38 comment added Mike J Thanks for all your suggestions. Stuff I agree and changed: camel case class names, starting exception, all code consolidation suggestions, probably classes for simpleType and simpleContent objects. Stuff I should explain more: This is the core data structure, I wrote a bunch of helper methods to quickly access all properties contained within to parse XML docs, produce flat files from them, validate database data according to the schema, and some other stuff. The dictionary/sometime distinction is done based on whether the object is a property of the root element or is a new element itself
Apr 18, 2012 at 14:46 history answered Winston Ewert CC BY-SA 3.0