JSTL import / load xml document from string variable

bolitoN

New Member
In a JSP page, using JSTL I can load an xml file, from xml file path or url to jstl variable as following:\[code\]<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <c:import url="my.xml" var="xmldocument"/>\[/code\]Now, how do I do the exactly same thing if my xml file is in a String variable instead of the file system?Say I have \[code\]<%String strXmlDoc = "<books><book><name>Padam History</name><author>ZARA</author><price>100</price></book></books>";%>\[/code\]how do I import that to jstl var "xmldocument"?Thanks.
 
Back
Top