Microsoft
Software
Hardware
Network
Question : anyone familur ith using the swing classes HTMLEditorKit StyleSheet and reading a external CSS
hello i am trying to read an external CSS file and get some attributes , like background color of a ID
so this part works ok
HTMLEditorKit kit = new HTMLEditorKit();
HTMLDocument doc = (HTMLDocument) kit.createDefaultDocument(
);
StyleSheet styles = doc.getStyleSheet();
styles.importStyleSheet( new URL("
http://test2.mydomain
.com/user.
css
") );
Enumeration rules = styles.getStyleNames();
while (rules.hasMoreElements()) {
System.out.println("------
----------
----------
---------"
);
String name = (String) rules.nextElement();
Style rule = styles.getStyle(name);
System.out.println(name+"-
-->"+rule.
toString()
);
}
i am trying to get the background color of the content
this is what the outs are printing
#content--->NamedStyle:#co
ntent {resolver=AttributeSet,nam
e=#content
,}
not sure where to go from here?
thanks for any help
Answer : anyone familur ith using the swing classes HTMLEditorKit StyleSheet and reading a external CSS
you can also donate to non-profit organisations...
Random Solutions
How to print logos on Epson T88IV
CSS issue with hidden menu drop downs
Self signed SSL certificate for Outlook Anywhere & OWA - Exchange 2010
How do I see what traffic is traversing my Cisco 2811 router?
Anyone knows what this fruit is called in english and if I can buy it in the USA somewhere even online
Hosted AD Domain Service - a best practice ?
Compare two excel files
DReamwever how to link pages.
CSS wrong MIME type in Firefox on Apache, AddType text/css .css is there
Where are mappings for XML files set inside of Eclips