Using java to create XML with DTD

You can use java to create dynamic XML with DTD. You can use the JSP (Java Server Pages) technology for that purpose. With JSP you can generate any type of document and not only HTML as many of you would have done.

The simplest was to fill up the contents of an XML file is to create a template XML file and then insert the java code within the text nodes for generation of the values of the elements.

You can also generate the elements by inserting appropriate java code in the place of the elements. For example in a jsp file, you can have something like,

<%@ page contentType="text/xml;charset=ISO-8859-1" %>
<?xml version="1.0" encoding="ISO-8859-1"?>
.
.
.
<some_element><% java code here %> </some_element>
.
.

In the above code we have a portion where the data of the XML file is generated by the java code.

You can also generate the XML tags itself by using the java code. This is only way of generating the XML file by using the java code.



.

SetApp - 100 Apps for everything you ever wanted to do on Mac

FREE Subscription

Subscribe to our mailing list and receive new articles
through email. Keep yourself updated with latest
developments in the industry.

Name:
Email:

Note : We never rent, trade, or sell my email lists to
anyone. We assure that your privacy is respected
and protected.

_______________________________________



 

FREE Subscription

Stay Current With the Latest Technology Developments Realted to XML. Signup for Our Newsletter and Receive New Articles Through Email.

Name:

Email:

Note : We never rent, trade, or sell our email lists to anyone. We assure that your privacy is respected and protected.

 

 

Add to My Yahoo!

Visit XML Training Material Guide Homepage

 

 

“Amazon and the Amazon logo are trademarks of Amazon.com, Inc. or its affiliates.”

Copyright - © 2004 - 2019 - All Rights Reserved.