R
Roedy Green
I wrote a bit of code using SAX to extract data from an XML
configuration file whose structure I composed myself. I thought to
myself, "This can't be right". Nobody in their right mind would invent
something so clumsy to extract the data." I used as a model various
bits of code I found on the net. I am hoping this information was
obsolete.
Is there a more streamlined way to do this?
In this case the XML file is quite small, so perhaps a DOM approach
might be more appropriate.
Here is the XML file I want to extract data from:
https://wush.net/websvn/mindprod/fi...&path=/com/mindprod/htmlreflow/htmlreflow.xml
Here is the XSD schema for the file
https://wush.net/websvn/mindprod/fi...&path=/com/mindprod/htmlreflow/htmlreflow.xsd
Here is my parsing code
https://wush.net/websvn/mindprod/fi...&path=/com/mindprod/htmlreflow/Configure.java
What bothers me is I explained in the XSD considerable detail about
the structure of the document, but none of this knowledge is
automatically used in extracting data.
configuration file whose structure I composed myself. I thought to
myself, "This can't be right". Nobody in their right mind would invent
something so clumsy to extract the data." I used as a model various
bits of code I found on the net. I am hoping this information was
obsolete.
Is there a more streamlined way to do this?
In this case the XML file is quite small, so perhaps a DOM approach
might be more appropriate.
Here is the XML file I want to extract data from:
https://wush.net/websvn/mindprod/fi...&path=/com/mindprod/htmlreflow/htmlreflow.xml
Here is the XSD schema for the file
https://wush.net/websvn/mindprod/fi...&path=/com/mindprod/htmlreflow/htmlreflow.xsd
Here is my parsing code
https://wush.net/websvn/mindprod/fi...&path=/com/mindprod/htmlreflow/Configure.java
What bothers me is I explained in the XSD considerable detail about
the structure of the document, but none of this knowledge is
automatically used in extracting data.