Я пытаюсь выяснить, как получить доступ к свойствам CSS для узла DOM (в этом примере узлов ) с помощью набора инструментов Cobra/Lobo. На данный момент у меня есть:
Я пытаюсь выяснить, как получить доступ к свойствам CSS для узла DOM (в этом примере узлов ) с помощью набора инструментов Cobra/Lobo. На данный момент у меня есть:
[code] UserAgentContext uacontext = new SimpleUserAgentContext(); DocumentBuilderImpl builder = new DocumentBuilderImpl(uacontext);
URL url = new URL(TEST_URI); InputStream in = url.openConnection().getInputStream();
Reader reader = new InputStreamReader(in, "ISO-8859-1"); InputSourceImpl inputSource = new InputSourceImpl(reader, TEST_URI); HTMLDocumentImpl d = (HTMLDocumentImpl) builder.parse(inputSource); HTMLCollection images = d.getImages();
for (int i = 0; i < images.getLength(); i++) {
HTMLElementImpl n = (HTMLElementImpl) images.item(i); AbstractCSS2Properties curr = n.getCurrentStyle();