Hi
I cannot find any equivalent issue/documentation/howto on my specific data structure.
I am getting an invalid template"
Please advise...
Code:
<div id="example" class="k-content">
<script id="template" type="text/x-kendo-template">
<li class="Notice">
<table style="width: 100%;">
<tr><td>#= guid#</td><td>#= category#</td><td>#= pubDate#</td></tr>
<tr><td>#= title#</td><td colspan="2">#= description#</td></tr>
<tr><td>#= ip:Type#</td><td>#= ip:TimeDown#</td><td>#= ip:ETTR#</td></tr>
<tr><td>#= ip:Progress#</td><td>#= ip:AreasAffected#</td><td>#= ip:Status#</td></tr>
</table>
</li>
</script>
<script type="text/javascript">
$(document).ready(function () {
var template = kendo.template($("#template").html());
var dataSource = new kendo.data.DataSource({
transport: {
read: "http://www.telkomsa.net/rss/saix.xml"
},
schema: {
type: "xml",
data: "/item",
model: {
fields: {
guid: "guid/text()",
pubDate: "pubDate/text()",
category: "category/text()",
title: "title/text()",
description: "description/text()",
pubDate: "pubDate/text()",
ip: {
Type: "Type/text()",
TimeDown: "TimeDown/text()",
ETTR: "ETTR/text()",
Progress: "Progress/text()",
AreasAffected: "AreasAffected/text()",
Status: "Status/text()"
} //ip
} //fields
} // model
} //schema
}); //datasource
}); //ready
</script>
</div>
XML Data:
<item xmlns:ip="www.ipact.telkom-ipnet.co.za"><guid isPermaLink="false">NN0008585</guid><pubDate>Fri, 22 Jun 2012 14:31:03 +0200</pubDate><category>Planned Work</category><title>Link - To perform Planned Maintenance on the Telkom Network at Secunda</title><description><center><b>Ref:</b> NN0008585</center><b>Category</b> Planned Work <b>Type:</b> Planned Work <b>Status:</b> New<BR><b>TimeDown:</b> Thu, 28 Jun 2012 20:00:00 +0200 <b>ETTR:</b> 8 Hours<BR><b>Areas affected:</b> DSLAM Affected: EMBALENHLE
DSLAM Affected: RST1 - UMLU
DSLAM Affected: RST2 - SIPU(A33)
DSLAM Affected: SECUNDA
DSLAM Affected: SECUNDA 2
DSLAM Affected: SECUNDA IMAX<BR><b>Progress:</b> </description><ip:Type>Planned Work</ip:Type><ip:TimeDown>Thu, 28 Jun 2012 20:00:00 +0200</ip:TimeDown><ip:ETTR>8 Hours</ip:ETTR><ip:Progress></ip:Progress><ip:AreasAffected>DSLAM Affected: EMBALENHLE
DSLAM Affected: RST1 - UMLU
DSLAM Affected: RST2 - SIPU(A33)
DSLAM Affected: SECUNDA
DSLAM Affected: SECUNDA 2
DSLAM Affected: SECUNDA IMAX</ip:AreasAffected><ip:Status>New</ip:Status></item>
Thanks!
I cannot find any equivalent issue/documentation/howto on my specific data structure.
I am getting an invalid template"
Please advise...
Code:
<div id="example" class="k-content">
<script id="template" type="text/x-kendo-template">
<li class="Notice">
<table style="width: 100%;">
<tr><td>#= guid#</td><td>#= category#</td><td>#= pubDate#</td></tr>
<tr><td>#= title#</td><td colspan="2">#= description#</td></tr>
<tr><td>#= ip:Type#</td><td>#= ip:TimeDown#</td><td>#= ip:ETTR#</td></tr>
<tr><td>#= ip:Progress#</td><td>#= ip:AreasAffected#</td><td>#= ip:Status#</td></tr>
</table>
</li>
</script>
<script type="text/javascript">
$(document).ready(function () {
var template = kendo.template($("#template").html());
var dataSource = new kendo.data.DataSource({
transport: {
read: "http://www.telkomsa.net/rss/saix.xml"
},
schema: {
type: "xml",
data: "/item",
model: {
fields: {
guid: "guid/text()",
pubDate: "pubDate/text()",
category: "category/text()",
title: "title/text()",
description: "description/text()",
pubDate: "pubDate/text()",
ip: {
Type: "Type/text()",
TimeDown: "TimeDown/text()",
ETTR: "ETTR/text()",
Progress: "Progress/text()",
AreasAffected: "AreasAffected/text()",
Status: "Status/text()"
} //ip
} //fields
} // model
} //schema
}); //datasource
}); //ready
</script>
</div>
XML Data:
<item xmlns:ip="www.ipact.telkom-ipnet.co.za"><guid isPermaLink="false">NN0008585</guid><pubDate>Fri, 22 Jun 2012 14:31:03 +0200</pubDate><category>Planned Work</category><title>Link - To perform Planned Maintenance on the Telkom Network at Secunda</title><description><center><b>Ref:</b> NN0008585</center><b>Category</b> Planned Work <b>Type:</b> Planned Work <b>Status:</b> New<BR><b>TimeDown:</b> Thu, 28 Jun 2012 20:00:00 +0200 <b>ETTR:</b> 8 Hours<BR><b>Areas affected:</b> DSLAM Affected: EMBALENHLE
DSLAM Affected: RST1 - UMLU
DSLAM Affected: RST2 - SIPU(A33)
DSLAM Affected: SECUNDA
DSLAM Affected: SECUNDA 2
DSLAM Affected: SECUNDA IMAX<BR><b>Progress:</b> </description><ip:Type>Planned Work</ip:Type><ip:TimeDown>Thu, 28 Jun 2012 20:00:00 +0200</ip:TimeDown><ip:ETTR>8 Hours</ip:ETTR><ip:Progress></ip:Progress><ip:AreasAffected>DSLAM Affected: EMBALENHLE
DSLAM Affected: RST1 - UMLU
DSLAM Affected: RST2 - SIPU(A33)
DSLAM Affected: SECUNDA
DSLAM Affected: SECUNDA 2
DSLAM Affected: SECUNDA IMAX</ip:AreasAffected><ip:Status>New</ip:Status></item>
Thanks!