I've used this excellent forum to teach myself some basic xpath to query an .XML file. I've got a sample of my XML file here, and I'm trying to import the [X,Y] coordinates of 3 objects in the XML file using Matlab:\[code\]<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"><dict> <key>ROI array</key> <array> <dict> <key>Comments</key> <string></string> <key>Name</key> <string>Unnamed</string> <key>ROIPoints</key> <array> <string>{129.24051549947484, 263.66036033996352}</string> <string>{114.61421850240453, 278.56760216125258}</string> <string>{123.11826208150609, 289.73859978088149}</string> <string>{125.11111111111111, 295.77777777777777}</string> </array> <key>Slice</key> <integer>58</integer> </dict> <dict> <key>Comments</key> <string></string> <key>Name</key> <string>Unnamed</string> <key>ROIPoints</key> <array> <string>{127.09352448499425, 261.31629753478774}</string> <string>{112.50917389905675, 277.25509453185805}</string> <string>{126.061969309213, 291.36980247863539}</string> <string>{141.48499634778722, 292.16234398254164}</string> <string>{149.71229126966222, 277.81281090148696}</string> </array> <key>Slice</key> <integer>59</integer> </dict> <dict> <key>Comments</key> <string></string> <key>Name</key> <string>Unnamed</string> <key>ROIPoints</key> <array> <string>{134.32833430087788, 258.21743274101027}</string> <string>{117.0812182120107, 266.44891620048293}</string> <string>{114.41427180087788, 292.20427203544386}</string> <string>{128.80573603427632, 299.11905932792433}</string> <string>{147.92307612216695, 299.11905932792433}</string> <string>{152.73700281894429, 285.80526996024855}</string> <string>{154.32626673495992, 268.51202655204543}</string> </array> <key>Slice</key> <integer>60</integer> </dict> </array></dict></plist>\[/code\]I've managed to export all of the coordinates using this Matlab code:\[code\]expression_2 = xpath.compile('plist/dict/array/dict/array/string');nodeList_2 = expression_2.evaluate(docNode, XPathConstants.NODESET);for i = 1:nodeList_2.getLength node = nodeList_2.item(i-1); coordinate_node{i} = char(node.getFirstChild.getNodeValue);end\[/code\]Does anyone know of an xpath query whereby I could count the NUMBER of [X,Y] coordinates in each object? I.e. something that returns 4 coordinates for the first object, 5 coordinates in the second and 7 coordinates in the 3rd?Thanks,Jim