File: xmlgraph.js

package info (click to toggle)
mozilla 19981008-0.1
  • links: PTS
  • area: main
  • in suites: slink
  • size: 110,368 kB
  • ctags: 148,791
  • sloc: ansic: 674,811; cpp: 548,132; makefile: 20,384; java: 13,005; sh: 3,638; perl: 2,433; yacc: 1,136; asm: 657; lisp: 148; objc: 51; pascal: 41; awk: 20; sed: 18; xml: 13; csh: 11
file content (23 lines) | stat: -rw-r--r-- 488 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
prefix = "";

xml = new XMLGraph();
xml.parseFile("moz.rdf");

function dumpobj(o, name) {
    print(prefix + "dumping " + name);
    prefix += "  ";
    if (typeof(o) != "object") {
	print(prefix + typeof(o) + " " + o + " is not an object!\n");
	return;
    }
    for (i in o) {
	if (typeof(o[i]) == "object") 
	    dumpobj(o[i], i);
	else
	    print(prefix + i + "=" + o[i]);
    }
    prefix = prefix.substring(2);
    print(prefix + "done " + name);
}

dumpobj(xml.graph, "RDF:RDF");