:: Forum >>

How to get XML as string?

When I call getXML() I can't see the XML code using alert():
Instead of showing XML it writes "[object]"
Monday, May 2, 2005
I am assuming that the getXML() method is returning an Xml node collection. You will probably need to iterate over the nodes and build the string by hand.
Saturday, November 12, 2005
why can't get XML's value?



Wednesday, November 16, 2005

Quoting Tim
> I am assuming that the getXML() method is returning an Xml node collection

So use the .xml property to retrieve as string. It works in IE for me.. But i haven't checked it others though.


I saw that you get xml only if setXML property was used. Issuing getXML() to a data model that uses HTTP Requests becomes undefined either.

Can somebody show some light on this? Probably Alex might ;-) Come on Alex, show yourself!! :)
Md. Sheriff, Drivestream
Thursday, November 24, 2005
Oops, I just solved this issue myself. Since HTTP Request that was made are async we obviously would not be able to see any XML until the response arrives.. So instead of scripting in code i tried this in the browser address bar.. and voila! IT WORKED :)


in similar contexts for

// create ActiveWidgets data model - XML-based table
    var table = new Active.XML.Table;

    // provide data URL
// DataSetURL

    // set rows XPath

    // set columns XPath
    table.setColumns(["UserID", "UserName", "UserAddress", "CompanyName", "CompanyState"]);

    // start asyncronous data retrieval

    // create ActiveWidgets Grid javascript object
    var obj = new Active.Controls.Grid;

    // provide column labels
    obj.setColumnProperty("texts", GridConfig.Columns[columnID]);

    // provide external model as a grid data source

Hope this helps :-)

(hmm... There isn't any option for this post to be followed-up so that this can be marked as [Resolved] and people with similar problems will readily pick this one and get away with the solution)
Md. Sheriff, Drivestream
Thursday, November 24, 2005
Apologies, that was a typo... (i think i should improve the habit typing in mains)
Md. Sheriff, Drivestream
Thursday, November 24, 2005

This topic is archived.

Back to support forum

Forum search