Sometimes, the http response is not a html page, but an XML document
instead.
I added the following method to DslContext
public String getXMLDocument(){
String script = """var doc = window.document;
var xml = null;
if(doc instanceof XMLDocument){
xml = new XMLSerializer().serializeToString(doc);
}else{
xml = getText(doc.body);
}
xml; """
String xml = getEval(script)
return xml
}
As a result, if you know that you will get back an XML file, just call
getXMLDocument()
in your module file. If you have a better way to handle the xml
document, please
let me know.
Thanks,
Jian
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"tellurium-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/tellurium-users?hl=en
-~----------~----~----~----~------~----~------~--~---