Validating url in java
SAX processes the input document element by element and can report events and significant data to callback methods in the application.
The XML document in Example 4-1 is parsed as a series of linear events as shown in Figure 4-2.
In general, the SAX API provides the following advantages: The JAXP API enables you to plug in an implementation of the SAX or DOM parser.
The SAX and DOM APIs provided in the Oracle XDK are examples of vendor-specific implementations supported by JAXP.
Regards, Abhishek when we are u using that time it working fine but that is not only web site ulr format for example ( .com, , , in ) like this lot of format is there .please post answer like all url validation supported ..
I have applied this in one of my projects and its working there. ([a-z A-Z0-9] (\.[a-z A-Z0-9] ) .*)$ Let me know if you face any problem.
Unlike DOM, SAX is event-based, so it does not build in-memory tree representations of input documents.For example, the DOM API receives the document described in Example 4-1 and creates an in-memory tree as shown in Figure 4-2.DOM provides classes and methods to navigate and process the tree.In general, the advantage of JAXP is that you can use it to write interoperable applications.If an application uses features available through JAXP, then it can very easily switch the implementation.