JSP™ and XML Integrating XML and Web Services in Your JSP™ Application
by Casey Kochmer, Erica Frandsen
Client-Side JavaScript and XML
The first example will use JavaScript on the client side to create an HTML table from an XML DOM. The DOM will also be created on the client from XML found inside an HTML DIV element.
The JSP begins with the output of HTML markup and JavaScript sent directly to the browser. Following that, the JSP queries the database for data. The results of the database query will then be processed into a JDOM representation and serialized to the client placed within a hidden HTML division. At this point, the client browser creates a DOM representation of the XML document found in the hidden DIV. JavaScript, combined with the data and structure of the XML, will be used to create the resulting HTML table.
The client browser will ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access