  | | | FOAF / XML Parser | FOAF / XML Parser 2004-03-16 - By Ted Patrick
Back Namespace support is the most likely problem.
Pathnames can contain ":" but you cannot access them without using [] or eval as follows:
Xobj = MyXML.toObject()
//this will fail as : is illegal in path Xobj.foaf:knows.foaf:Person.foaf:nick._value
//this will work as strings are evaled at each object node Xobj['foaf:knows']['foaf:Person']['foaf:nick']._value
Within an object you can use any character as a name, but you must set and get the value as follows:
//set operation myObj['@#$@#$@#$!@#$)*#@)($@#$'] = 1234
/get operation trace(myObj['@#$@#$@#$!@#$)*#@)($@#$'])
Cheers,
Theodore E. Patrick PowerSDK - Code for a distributed world http://www.powersdk.com > Hello 'flashcoders, > > Has anyone tried to parse FOAF? > I've never encountered XML like > > <foaf:knows> > <foaf:Person> > <foaf:nick> > usernick > </foaf:nick> > <rdfs:seeAlso > rdf:resource="http://friendurl/blog/foaf" /> > <foaf:weblog rdf:resource="http://friendurl/blog" /> > </foaf:Person> > </foaf:knows> > > And of course .toObject doesn't work... > > I'm using AS2 right now so may be there's some good XML > parser (and small, since .toObject is just 20 lines long!)? > > Thanks. > > -- > Lynx, > <lj user="emulynx"> mailto:emulynx@(protected) > ---- > Man is ready to die for an idea, > provided that idea is not quite clear to him. > > Eldridge, Paul
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- Supported by Fig Leaf Software =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- Be sure to check the archives and the wiki: http://chattyfig.figleaf.com/ =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:107078 =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- To unsubscribe send a blank e-mail to: Normal Mode: flashcoders-unsubscribe@(protected) Digest Mode: flashcoders-digest-unsubscrive@(protected)
|
|
 |