tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rolf Niepraschk <Rolf.Niepras...@ptb.de>
Subject write modified xml files -- please help
Date Thu, 28 Jul 2005 11:44:26 GMT
Hello,

I use the xtags tag library and I'm not very familar with the XPATH 
syntax. The following should my program do:

1. Read a XML file from elsewhere.

2. One or more tag content should be modified.

3. One ore more values of attributes should also be modified.

4. The modified structure should be written as a XML file to elsewhere.

At the end of this email is my first try which works only a bit. What is 
the best way with this or another taglib?

Many thanks in advance,

...Rolf

-----------------------------------------------------------------------

<head>
   <title>Test zu XML</title>
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
   <%@ page contentType="text/html" %>
   <%@ page isELIgnored="false" %>
   <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
   <%@ taglib prefix="xtags" 
uri="http://jakarta.apache.org/taglibs/xtags-1.0" %>
</head>

<html>
<head>
   <title>Test zu XML</title>
</head>

<body bgcolor="#FFFFCC">

<xtags:parse id="doc">
<peoples>
   <comment>First Version</comment>
   <name sex="f" foo="bar"> Ludmilla </name>
   <name sex="m" foo="baz"> Fridolin </name>
</peoples>
</xtags:parse>

<textarea name="debug" cols="50" rows="6">
<xtags:copyOf select="/" />
</textarea>

<br />

<xtags:context select="peoples/name[1]" >
<xtags:replace><name>Gustav</name></xtags:replace>
</xtags:context>

<textarea name="debug" cols="50" rows="6">
<xtags:copyOf select="/" />
</textarea>

</body>
</html>



-- 
|| Rolf Niepraschk c/o Physikalisch-Technische Bundesanstalt      ||
|| Abbestr. 2-12; D-10587 Berlin, Germany                         ||
|| Tel/Fax: ++49-30-3481-7316/7490, email: Rolf.Niepraschk@ptb.de ||


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Mime
View raw message