[Project_owners] Value of RDF subject resource

Michael A Nachbaur mike at nachbaur.com
Tue Jul 19 12:00:23 EDT 2005

Eric Jung wrote:
> Hi,
> I have an RDF subject, and I'm trying to get its string value (the
> value of the RDF:about attribute). I thought subjectRes.Value should
> work, but it doesn't -- subjectRes.Value is undefined. When I dump
> subjectRes itself, I'm shown [xpconnect wrapped nsISupports].
> Do I need to cast it to another interface? Anyone have idea what I
> might be doing wrong?

Yes, you need to cast it as an nsIRDFResource.

if (subjectRes instanceof Components.interfaces.nsIRDFResource) {
    var string = subjectRes.Value;


subjectRes = 

Michael A Nachbaur <mike at nachbaur.com>

More information about the Project_owners mailing list