I'm trying to write a program that will connect to a website, get the source code, look for the <body>
tag using nodes. Within that tag there are three "textfields" that I want to input values in, and stream it back to the website.
I got so far to finding the <body>
tag, but now I'm actually clueless.
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());