DHTMLX GRID

Hi!

I am getting XML in some other format using java web serivces.How could a customize code so that the format in which the grid support automaticaely get parseable in , format.is It any way to achieve throughJSON

Thanks;

Ravi Gopalani

Please check
dhtmlx.com/docs/products/dhtmlxG … tloadtypes

Hi!
      The link you send me is not fulfilling the requirement.My requirement is :smiley:ata will be available in XML in any format through web services.Lets say below mention format:
"<recipe name=“bread” prep_time=“5 mins” cook_time=“3 hours”> Basic bread <ingredient amount=“8” unit=“dL”>Flour <ingredient amount=“10” unit=“grams”>Yeast <ingredient amount=“4” unit=“dL” state=“warm”>Water <ingredient amount=“1” unit=“teaspoon”>Salt Mix all ingredients together. Knead thoroughly. Cover with a cloth, and leave for one hour in warm room. Knead again. Place in a bread baking tin. Cover with a cloth, and leave for one hour in warm room. Bake in the oven at 180(degrees)C for 30 minutes. ";
Now I have to change into data grid support format.i.e rows-cell style…so I need to make customize code not  only for the above mention XML.I should right some generic code which should support all forms of XML data whether Tree Structure …simple data.Please let me know.Its possible to right generic function which can support all forms of XML formats.
Thanks,
Ravi Gopalani

You can use three-steps loading process

a) use dhtmlxAjax to fetch xml in your custom format to the client side
b) transform it to the necessary format ( xslt transformation through the same dhtmlxAjax object is possible )
c) load grid from result of conversion ( grid.parse )

Hi !
          Can you please give me sample code.


The example:


dhtmlxAjax.get(custom_xml,outputResponse);

function outputResponse(loader){
if(!loader.xmlDoc) return
xml_string = loader.doXSLTransToString(xslDoc,loader.xmlDoc)
grid.parse(xml_string)
}




Hi!
      I have tried sample code but getting error:

isIE is not a function
dhtmlxco…s?ver=1.1 (line 88)
isIE is not a function
if (!isIE()){if (!this.XSLProcessor){th…responseXML)xmlDoc=xmlDoc.responseXML\r\n
Below mention is the sample code:
 dhtmlxAjax.get("<?xml version=\"1.0\"?>
<person created=“2006-11-11T19:23” modified=“2006-12-31T23:59”>\n Robert\n Smith\n <address type=“home”>\n 12345 Sixth Ave\n Anytown\n CA\n 98765-4321\n \n <person created=“2006-11-11T19:23” modified=“2006-12-31T23:59”>\n Robert\n Smith\n <address type=“home”>\n 12345 Sixth Ave\n Anytown\n CA\n 98765-4321\n \n
“,loadXmlData);


 }
 function loadXmlData(loader){
  
 if(!loader.xmlDoc) return
  xml_string = loader.doXSLTransToString(”<xsl:stylesheet version=“1.0” xmlns:xsl="http://www.w3.org/1999/XSL/Transform"></xsl:stylesheet>",loader.xmlDoc)
  grid.parse(xml_string)
}


Please let me know where I m doing a mistake


Hello


Ajax loads data from server and get() method requires path to xml file (or to server-side page that genarates xml stream): dhtmlxAjax(“some.xml”,handler);


You’ve tried to use get method with xml string instead of file. You can create xmlObject from the xml string and then using xsl tranformation to load data to the grid.


A ready solution for transformation can be done only by additional fee. If you are insterested in it, please contact us at sales@dhtmlx.com

Hi!
      Cisco is using licensed version only.So It will be helpful,if you send me the proper solution at this mail id: ravigopa@cisco.com.
Thanks,
Ravi Gopalani