foaf = new DataSource(); INSERT {[http://www.w3.org/1999/02/22-rdf-syntax-ns#type] [mailto:drepchick@intellidimension.com] [http://xmlns.com/foaf/0.1/Person]} {[http://xmlns.com/foaf/0.1/firstName] [mailto:drepchick@intellidimension.com] "Derrish"} {[http://xmlns.com/foaf/0.1/knows] [mailto:drepchick@intellidimension.com] [mailto:gchappell@intellidimension.com]} {[http://www.w3.org/1999/02/22-rdf-syntax-ns#type] [mailto:gchappell@intellidimension.com] [http://xmlns.com/foaf/0.1/Person]} {[http://xmlns.com/foaf/0.1/firstName] [mailto:gchappell@intellidimension.com] "Geoff"} {[http://xmlns.com/foaf/0.1/knows] [mailto:gchappell@intellidimension.com] [mailto:drepchick@intellidimension.com]} INTO #foaf; var ary = foaf.getObjects(); for (var i = 0; i < ary.length; i++) { dumpPerson(ary[i]); } function dumpPerson(node) { var s = node["http://xmlns.com/foaf/0.1/firstName"]; var ary = node["http://xmlns.com/foaf/0.1/knows"]; if (ary != null) { s += " -> "; for (var i = 0; i < ary.length; i++) { if (i > 0) s += ", "; s += ary[i]["http://xmlns.com/foaf/0.1/firstName"]; } } Response.write(s); }