I find this project very interesting and want to use it to create XML output file not only with Elements and Text nodes, but also with attributes. I want in attributes to put information, for example from "column" TAG or other static data. Is it possible with current version? If not - how 'treeXMLMapping.xml', 'dbsql2xml.xsd' and 'dbsql2xml.java' files have to be changed to support this functionality?
May be I have to add following line:
newElement.setAttribute("attr_name", "attr_value");
in dbsql2xml.java, processColumnElement(..) method...
Thanks for response in advance!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Currently "dbsql2xml" does not support creating of attributes. I do it using XSLT running over outputed XML document (apply XSLT , which transforms some elements to attributes).
To add this functionality, there need to be changed files You mentioned: input mapping XML files, XSD file and java file. This mean, that within mapping <column/> element need to be inserted element like:
Feel free to change "dbsql2xml" to add this functionality. In distribution is BAT file to create distribution (if You have hsqldb database with its test data). If You want to be added as developer to have direct access to development of "dbsql2xml", drop me a line, should not be problem. Or You can send me distribution of new version, I will test it and uploaded it.
Well, my long-time pain of "dbsql2xml" is to change code or verify to be "dbsql2xml" thread-safe, to be run without SingleThreadModel interface inside servlet. If You have also knowledge about this (or anyone else, who will read this and want to help), it will be very appreciated.
Bye, Stepan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Stepan,
I find this project very interesting and want to use it to create XML output file not only with Elements and Text nodes, but also with attributes. I want in attributes to put information, for example from "column" TAG or other static data. Is it possible with current version? If not - how 'treeXMLMapping.xml', 'dbsql2xml.xsd' and 'dbsql2xml.java' files have to be changed to support this functionality?
May be I have to add following line:
newElement.setAttribute("attr_name", "attr_value");
in dbsql2xml.java, processColumnElement(..) method...
Thanks for response in advance!
Hi!
Currently "dbsql2xml" does not support creating of attributes. I do it using XSLT running over outputed XML document (apply XSLT , which transforms some elements to attributes).
To add this functionality, there need to be changed files You mentioned: input mapping XML files, XSD file and java file. This mean, that within mapping <column/> element need to be inserted element like:
<attribute xmlName="nameOfAttribute" sqlName="nameOfResultSetColumn"/>
Feel free to change "dbsql2xml" to add this functionality. In distribution is BAT file to create distribution (if You have hsqldb database with its test data). If You want to be added as developer to have direct access to development of "dbsql2xml", drop me a line, should not be problem. Or You can send me distribution of new version, I will test it and uploaded it.
Well, my long-time pain of "dbsql2xml" is to change code or verify to be "dbsql2xml" thread-safe, to be run without SingleThreadModel interface inside servlet. If You have also knowledge about this (or anyone else, who will read this and want to help), it will be very appreciated.
Bye, Stepan