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://codercto.com/soft/d/2779.html

Release It!

Release It!

Michael T. Nygard / Pragmatic Bookshelf / 2007-03-30 / USD 34.95

“Feature complete” is not the same as “production ready.” Whether it’s in Java, .NET, or Ruby on Rails, getting your application ready to ship is only half the battle. Did you design your system to......一起来看看 《Release It!》 这本书的介绍吧!

随机密码生成器
随机密码生成器

多种字符组合密码

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具