NYefimov
16 years agoOccasional Contributor
Validate HTML content
Hello,
I need to validate that for instance the service AccountManagementService has the value Pass
in its row in the attached file DiagnosticPage.html.
Can you write something for this, please?
I got the contents of the web page in the file by doing this:
def address = DiagnosticPage;
def file = new FileOutputStream("C:\\DiagnosticPage.html")
//def file = new FileOutputStream("C:\\DiagnosticPage.xml")
def out = new BufferedOutputStream(file)
out << new URL(address).openStream()
out.close()
Another question:
can you do the validation on the fly?
(without writing contents in the file first)
I need to validate that for instance the service AccountManagementService has the value Pass
in its row in the attached file DiagnosticPage.html.
Can you write something for this, please?
I got the contents of the web page in the file by doing this:
def address = DiagnosticPage;
def file = new FileOutputStream("C:\\DiagnosticPage.html")
//def file = new FileOutputStream("C:\\DiagnosticPage.xml")
def out = new BufferedOutputStream(file)
out << new URL(address).openStream()
out.close()
Another question:
can you do the validation on the fly?
(without writing contents in the file first)