I have a rich text field that contains URL hotspots. I want to use the two new LotusScript classes of NotesRichTextNavigator and NotesRichTextDocLink to construct a list of the URLs found in these hotspots in the rich text body field. After I construct this list I want to automatically validate the URLs to ensure that the links exist and work. I was recently told that this functionality exists in Java classes that I could use in an agent. I could not find this. Does anyone know how this could be done?
A NotesRichTextDocLink object represents a Notes link, not a URL link. You can use a NotesDXLExporter and a NotesDOMParser to model the document. Then GetElementsByTagName(“urllink”) gets the URL links.Once you have a link, you can try using URLOpen to open it. If it opens, you still do not really know that it is valid. The web page might say, “This web site no longer exists”, or it might be an ISP’s placeholder for a parked domain. If the web page does not open, you still do not really know that the link is not valid. The server might be down temporarily. Things like this make it difficult to validate URLs automatically.