本文整理匯總了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");
},