我正在尝试编写一个程序来连接到网站,获取源代码,<body>
使用节点查找标签。在该标签中,我想在其中输入三个“文本字段”,并将其流式传输回网站。
我到目前为止找到了<body>
标签,但现在我实际上一无所知。
try
{
Tidy tidy = new Tidy();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
Document docx = tidy.parseDOM(new URL("http://www.clubvip.co.za/Login.aspx").openStream(), baos);
Node n = docx.getFirstChild();
System.out.println(n.getNodeName());
n = n.getFirstChild();
System.out.println(n.getNodeName());
while (n != null)
{
while (n != null) {
if (n.getNodeName() != "body") {
n = n.getNextSibling();
System.out.println(n.getNodeName());