本文整理汇总了TypeScript中dojox/xml/parser.parse函数的典型用法代码示例。如果您正苦于以下问题:TypeScript parse函数的具体用法?TypeScript parse怎么用?TypeScript parse使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了parse函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: GetFromRequestXML
export function GetFromRequestXML(QuerySetId, requestXml) {
try {
var domXml = parser.parse(requestXml);
// Not all XML is a "Request" ---
if (lang.exists("firstChild.tagName", domXml) && domXml.firstChild.tagName.indexOf("Request") === domXml.firstChild.tagName.length - 7) {
return this.Get(QuerySetId, domXml.firstChild.tagName.slice(0, -7));
}
} catch (e) {
}
return null;
}
示例2: ESPBase
return ESPRequest.send("WsDfu", "DFUDefFile", params).then(function (response) {
try {
var domXml = parser.parse(response);
var espBase = new ESPBase();
var exceptions = espBase.getValues(domXml, "Exception", ["Exception"]);
if (exceptions.length) {
response = "";
arrayUtil.forEach(exceptions, function (item, idx) {
response += item.Message + "\n";
});
}
} catch (e) {
// No errors ---
}
return response;
});
示例3: function
SubmitXML: function (xml) {
var deferred = new Deferred();
if (this.queries[xml]) {
deferred.resolve(this.queries[xml]);
} else {
var domXml = parser.parse(xml);
var query = {};
arrayUtil.forEach(domXml.firstChild.childNodes, function (item, idx) {
if (item.tagName) {
query[item.tagName] = item.textContent;
}
});
var context = this;
WsEcl.Submit(this.QuerySetId, this.Id, query).then(function (response) {
context.queries[xml] = response;
deferred.resolve(response);
return response;
});
}
return deferred.promise;
},
示例4: function
getStructure: function () {
var structure = [
{
cells: [
[
{
label: "##", field: "__hpcc_rowNum", leafID: "__hpcc_rowNum", width: 54, className: "resultGridCell", sortable: false
}
]
]
}
];
var dom = parser.parse(this.XmlSchema);
var dataset = this.getFirstSchemaNode(dom, "Dataset");
var innerStruct = this.getRowStructureFromSchema(dataset, "");
for (var i = 0; i < innerStruct.length; ++i) {
structure[0].cells[structure[0].cells.length - 1].push(innerStruct[i]);
}
this.store._structure = structure[0].cells[0];
return this.store._structure;
},
示例5: function
merge: function (xgmml) {
this.xgmml = xgmml;
var dom = parser.parse(xgmml);
this.walkDocument(dom.documentElement, "0");
},