Hello,
I'm pretty new to accessing xml with spry and am having trouble accessing nested xml data. The primary data I'm trying to have show is contained in the nodes COMMITTEE_NAME and MEMBER_NAME. I can get the COMMITTEE_NAME to show, but can't get the MEMBER_NAME data to show under each committee name. I'm getting pretty frustrated ;-\ and any help would be greatly appreciated!!
The xml file can be found at: http://www.leg.state.or.us/xml/senate_committee_members2.xml .
Below is the HTML with the non-working subpath code and directly below is the URL of the same file on our sever.
URL: http://www.leg.state.or.us/test/xmlTest.html
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:spry="http://ns.adobe.com/spry">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script src="../SpryAssets/xpath.js" type="text/javascript"></script>
<script src="../SpryAssets/SpryData.js" type="text/javascript"></script>
<link href="../SpryAssets/SpryStackedContainers.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
var ds1 = new Spry.Data.XMLDataSet("../xml/senate_committee_members2.xml", "ROWSET/ROW", { subpaths: [ "COMMITTEENAME/MEMBERNAME/MEMBERNAME_ROW", "MEMBER_NAME" ] });
ds1.setColumnType("COMMITTEE_NAME", "html");
ds1.setColumnType("MEMBERNAME", "html");
ds1.setColumnType("MEMBERNAME_ROW", "html");
ds1.setColumnType("MEMBER_NAME", "html");
ds1.setColumnType("@num", "html");
</script>
</head>
<body>
<div spry:region="ds1" class="StackedContainers">
<div spry:repeat="ds1" class="RowContainer">
<p class="RowColumn">Committee_Name: {COMMITTEE_NAME}</p>
<p class="RowColumn">Membername: {MEMBERNAME}</p>
<p class="RowColumn">Membername_row: {MEMBERNAME_ROW}</p>
<p class="RowColumn">Member_Name: {MEMBER_NAME}</p>
<p class="RowColumn">@nums: {@num}</p>
</div>
</div>
Hello 9
</body>
</html>
Thank you very much!!
North America
Europe, Middle East and Africa
Asia Pacific