DOMHTMLDocument Additions Reference
(informal protocol)
| Inherits from | DOMDocument : DOMNode : DOMObject : WebScriptObject : NSObject |
| Conforms to | |
| Framework | /System/Library/Frameworks/WebKit.framework |
| Availability | Available in OS X v10.5 and later. |
| Declared in | DOMExtensions.h |
| Companion guides |
Instance Methods
createDocumentFragmentWithMarkupString:baseURL:
Creates a document fragment containing the given HTML markup.
Parameters
- markupString
The HTML content to parse into a DOM tree.
- baseURL
The URI from which the content originated. Used for interpreting relative URLs.
Return Value
A DOMDocumentFragment derived from the original markup string.
Discussion
This is a convenience method for the createDocumentFragment method in DOMDocument. It creates a fragment that has the HTML markup parsed into child nodes of the fragment using the baseURL to resolve any relative paths for images or other resources.
Availability
- Available in OS X v10.5 and later.
Declared In
DOMExtensions.hcreateDocumentFragmentWithText:
Creates a document fragment containing the given text.
Parameters
- text
The text to convert.
Return Value
A DOMDocumentFragment object derived from the source text.
Discussion
This is a convenience method for the createDocumentFragment method in DOMDocument. This method creates a fragment that contains the supplied plain text.
Availability
- Available in OS X v10.5 and later.
Declared In
DOMExtensions.h© 2009 Apple Inc. All Rights Reserved. (Last updated: 2009-08-19)