我想在浏览器中显示XML文档。我希望以折叠的形式显示XML并能够展开它 - 就像您直接使用浏览器查看XML文档一样。这可能吗? 我现在可以使用以下脚本将XML显示为文本:
// Handle_OnRowSelectSETIData
function Handle_OnRowSelectSETIData(sender, args)// When the user selects a SETIData do this script
{
var _SETIDataRow = args["Row"];
SETIData_ID = _SETIDataRow.getDataItem()["SETIData_ID"];// Picks up the ID of the data
_HitSML = document.getElementById("HitSML");// Pick up the place where it will be displayed
_HitSML.innerText = _SETIDataRow.getDataItem()["SML"];// Get the XML itself and send it to the browser
}
您可以在此处查看示例:Current Example (在底部网格渲染中选择" 620" ...) Example Link