-
-
Nested Class Summary
Nested Classes
Modifier and Type |
Class |
Description |
static class |
CssParser.ParseError |
Encapsulate information about the source and nature of errors encountered
while parsing CSS or applying styles to Nodes.
|
-
Constructor Summary
Constructors
Constructor |
Description |
CssParser() |
|
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
CssParser
public CssParser()
-
Method Detail
-
parse
public Stylesheet parse(String docbase,
String stylesheetText)
throws IOException
Creates a stylesheet from a CSS document string using docbase as the base
URL for resolving references within stylesheet.
- Parameters:
docbase
- the doc base for resolving URL references
stylesheetText
- the CSS document to parse
- Returns:
- the Stylesheet
- Throws:
IOException
- the exception
-
parse
public Stylesheet parse(URL url)
throws IOException
Updates the given stylesheet by reading a CSS document from a URL,
assuming UTF-8 encoding.
- Parameters:
url
- URL of the stylesheet to parse
- Returns:
- the stylesheet
- Throws:
IOException
- the exception