Grid LoadXML fails with Server Request


I have a problem when trying to load XML to a gid.

I can load a file “.xml”

but when i try to load xml data by calling a server method. It fails with the message (error type: load XML / Description: Incorrect XML)

here is the client code:

dhxTree.attachEvent(“onClick”, function(nodeId) {

dhxGrid.clearAll(); //remove all data

gridQString = “GetDocuments.aspx?ID=” + nodeId ; //save query string in global variable (see step 5 for details)

dhxGrid.loadXML(gridQString); // load new dataset from sever with additional parameter passed


and here is what the server page produces:

<?xml version='1.0' encoding='utf-8' ?>

Projet Pipe Stavenger


Henry Dupont



from the following code:


dim valeur as string

dim texteretour as string

valeur = Request.QueryString(“ID”)

texteretour = RecupFichiers(ID)

Response.Write(texteretour) '<-- texteretour gets the string with the result data shown above.


I have no idea why it doesn’t work as it is the same format that i use in my xml files that i can load.

thanks in advance for your help

You need to set content type of response as “text/xml”

Yop, that’s right!!
thanks a lot !