- 授权协议: LGPL
- 开发语言: Java
- 操作系统: 跨平台
- 软件首页: http://lobobrowser.org/cobra.jsp
软件介绍
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);
HTML & XHTML
Chuck Musciano、Bill Kennedy / O'Reilly Media / 2006-10-27 / GBP 39.99
"...lucid, in-depth descriptions of the behavior of every HTML tag on every major browser and platform, plus enough dry humor to make the book a pleasure to read." --Edward Mendelson, PC Magazine "Whe......一起来看看 《HTML & XHTML》 这本书的介绍吧!
