HTML 解析和生成器 Cobra

码农软件 · 软件分类 · HTML解析器 · 2019-04-03 15:56:33

软件介绍

Cobra 是一个纯 Java 的HTML 解析和生成器,支持 HTML 4 、JavaScript、CSS 2

示例代码:

import org.lobobrowser.html.parser.*;
import org.lobobrowser.html.test.*;
import org.lobobrowser.html.gui.*;
import org.lobobrowser.html.*;
import org.w3c.dom.*;
...
HtmlPanel panel = new HtmlPanel();
// This panel should be added to a JFrame or
// another Swing component.
UserAgentcontext ucontext = new SimpleUserAgentContext();
SimpleHtmlRendererContext rcontext = new SimpleHtmlRendererContext(panel, ucontext);
// Note that document builder should receive both contexts.
DocumentBuilderImpl dbi = new DocumentBuilderImpl(ucontext, rcontext);
// A documentURI should be provided to resolve relative URIs.
Document document = dbi.parse(new InputSourceImpl(documentReader, documentURI));
// Now set document in panel. This is what causes the document to render.
panel.setDocument(document, rcontext);

本文地址:https://www.codercto.com/soft/d/2779.html

How to Think Like a Computer Scientist: Learning with Python

How to Think Like a Computer Scientist: Learning with Python

Allen B. Downey、Jeffrey Elkner、Chris Meyers / Green Tea Press / 2002-1-4 / USD 24.95

""How to Think Like a Computer Scientist"" is an introduction to programming using Python, one of the best languages for beginners. This is a Free Book -- you can download it from thinkpython.com. But......一起来看看 《How to Think Like a Computer Scientist: Learning with Python》 这本书的介绍吧!

SHA 加密
SHA 加密

SHA 加密工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具