Mac Developer Library

Developer

PSLink Class Reference

Options
Deployment Target:

On This Page

PSLink

More...

Inheritance


Conforms To


Import Statement


Not Applicable @import PubSub;

Availability


Available in OS X v10.5 and later.
Deprecated in OS X v10.9.
  • Returns an array of links objects, one for each link found in an XML tree.

    Declaration

    Objective-C

    + (NSArray *)linksInXML:(NSXMLElement *)root baseURL:(NSURL *)baseURL

    Parameters

    root

    The root element of the parsed XMLDocument.

    baseURL

    An optional absolute URL, used to interpret relative URLs in links. If provided, the URL accessors of all returned PSLink objects will always return absolute URLs.

    Return Value

    An array of PSLink objects, one for each link found in the XML tree.

    Discussion

    Use this method if you have retrieved an XML (or HTML) document without creating a PSFeed object and want to examine it for links. If you just want to find the links from a PSFeed object, call its links method instead.

    Import Statement

    Availability

    Available in OS X v10.5 and later.

    Deprecated in OS X v10.9.

  • URL URL (OS X v10.9) Property

    The URL linked to. (read-only)

    Declaration

    Objective-C

    @property(readonly) NSURL *URL

    Discussion

    In HTML and Atom documents, this is the value of the href attribute. In RSS documents, it is the content of the <link> element.

    Import Statement

    Availability

    Available in OS X v10.5 and later.

    Deprecated in OS X v10.9.

  • title title (OS X v10.9) Property

    The human-readable title of the link, if it exists. (read-only)

    Declaration

    Objective-C

    @property(readonly) NSString *title

    Discussion

    In HTML and Atom documents, this is the value of the title attribute. Links in RSS documents have no title.

    Import Statement

    Availability

    Available in OS X v10.5 and later.

    Deprecated in OS X v10.9.

  • relations relations (OS X v10.9) Property

    The set of relations declared by the <link> element. (read-only)

    Declaration

    Objective-C

    @property(readonly) NSSet *relations

    Discussion

    This value is derived from the rel attribute, as defined by the HTML and Atom specifications. The value of the attribute is split into words at whitespace boundaries, and the individual words lowercased to facilitate case-insensitive comparison.

    The default value of this method, if no rel attribute exists, is a set containing the string alternate.

    Import Statement

    Availability

    Available in OS X v10.5 and later.

    Deprecated in OS X v10.9.

  • MIMEType MIMEType (OS X v10.9) Property

    The MIME type of the linked-to document. (read-only)

    Declaration

    Objective-C

    @property(readonly) NSString *MIMEType

    Discussion

    In HTML and Atom documents, this is the value of the type attribute. Links in RSS documents have no MIME type.

    Import Statement

    Availability

    Available in OS X v10.5 and later.

    Deprecated in OS X v10.9.

  • linkKind linkKind (OS X v10.9) Property

    The format of the linked-to document. (read-only)

    Declaration

    Objective-C

    @property(readonly) PSLinkKind linkKind

    Discussion

    The type of a link is derived by looking at the relations, title, and MIME type, as defined by the relevant specifications.

    Import Statement

    Availability

    Available in OS X v10.5 and later.

    Deprecated in OS X v10.9.