StringBuffer oXML = new StringBuffer(8192);
oXML.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<?xml-stylesheet type=\"text/xsl\"?>\n<categories count=\"" + String.valueOf(iCatCount) + "\">\n");
Category oCurrentCat = new Category();
for (int c=0; c<iCatCount; c++) {
oXML.append(" <category>");
oXML.append("<gu_category>"+dbs.getString(0,c)+"</gu_category><nm_category>"+dbs.getString(1,c)+"</nm_category><tr_category><![CDATA["+dbs.getStringNull(2,c,"")+"]]></tr_category><de_category><![CDATA["+dbs.getStringNull(3,c,"")+"]]></de_category>");
oXML.append("<images>");
for (int i=0; i<iImgCount; i++) {
int iCompare = dbs.getString(0,c).compareTo(img.getString(0,i));
if (iCompare>0)
break;
else if (iCompare==0) {
oXML.append("<image><gu_image>"+img.getString(1,i)+"</gu_image>");
oCurrentCat.replace(DB.gu_category, dbs.getString(0,c));
try {
oXML.append("<src_image>"+sWrkArGet+"/"+sWorkAreaId+"/apps/Shop/"+oCurrentCat.getPath(con)+"/"+img.getStringNull(3,i,"")+"</src_image>");
}
catch (SQLException sqle) {
if (DebugFile.trace) DebugFile.writeln("SQLException at Category.getPath(" + dbs.getString(0,c) + ") " + sqle.getMessage());
oXML.append("<src_image></src_image>");
}