Jerry You'll need core taglib and xml taglib e.g. http://www.tutorialspoint.com/jsp/jstl_xml_out_tag.htm declaration:<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %> use core taglib to set var:<c:set var="xmltext"> <books> <book> <name>Padam History</name> <author>ZARA</author> <price>100</price> </book> <book> <name>Great Mistry</name> <author>NUHA</author> <price>2000</price> </book> </books> </c:set> use xml taglib to set parse var: <x:parse xml="${xmltext}" var="output"/> use xml taglib to set output the parsed text<x:out select="$output/books/book[1]/name" /> http://www.tutorialspoint.com/jsp/jstl_xml_out_tag.htm Martin______________________________________________ Jogi és Bizalmassági kinyilatkoztatás/Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Ez az üzenet bizalmas. Ha nem ön az akinek szánva volt, akkor kérjük, hogy jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának készítése nem megengedett. Ez az üzenet csak ismeret cserét szolgál és semmiféle jogi alkalmazhatósága sincs. Mivel az electronikus üzenetek könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet ezen üzenet tartalma miatt.
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > Date: Sat, 20 Apr 2013 13:14:21 -0500 > Subject: JSTL XML Basic Question > From: 2ndgenfi...@gmail.com > To: users@tomcat.apache.org > > I have been searching for several hours for a basic JSTL answer with no > luck. From what I can tell, JSTL is under the umbrella of Tomcat. > Hopefully someone can help me out. > > I simply want to use an existing already-parsed DOM (org.w3c.dom.Document > variable) with JSTL XML tags. In other words, I want to skip the x:parse > step and just tell x:out and all of the other x tags to pull data from my > pre-existing pre-parsed DOM: > > Document myDOM; // already built by another part of the code > > I understand basic xpath stuff. But I'm not sure how to tell it to use a > standard local java variable for the DOM. > > I've tried <x:out select="$myDOM/aaaaa/bbbbb"/> and <x:out > select="${myDOM}/aaaaa/bbbbb"/> > > Both give me errors that seem to say it doesn't find a DOM. > > Every example I can find always assumes I want to start with a true > non-parsed XML document. > > I'm sure I'm missing something obvious. But can someone please help me out > with the correct syntax? > > Thanks. > > Jerry