Hi,
i cant just remove lines out of my xml file. this code is shown all in one
line in my file. i dont know why it is splitted by a line break in the
mailinglist.
with using this code:
<target name="AenderungApplicationXML" depends="warEntpacken"
description="Anpassungen in application.xml">
<xmltask source="${AppXML}" >
<copy path="/:application/:display-name/text()"
property="dn_value"/>
<copy path="/:application/:module/@id"
attrvalue="true" property="id_value"/>
<copy
path="/:application/:module/:web/:context-root/text()"
property="cr_value"/>
</xmltask>
i get the display-name element (EARFILE), i get the context-root
(ABCPortlets) but i DONT get the attribute 'id'. what would a proper Path
look like to read out the id attribute in /application/module/@id ?
Regards
Jackie James
<[EMAIL PROTECTED]
osys.com> To
Patrick Luebbecke/Germany/[EMAIL
PROTECTED]
01.10.2008 12:28 cc
Subject
RE: [Xmltask-users] Reading out an
attribute
Just remove these 3 attributes:
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/application_1_4.xsd"
from your root tag and I think it should work.
-----Original Message-----
From: Patrick Luebbecke [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 01, 2008 3:46 PM
To: [email protected]
Subject: [Xmltask-users] Reading out an attribute
lo all
i'd like to find the id attribute in the /application/module/ path. the
command i'm using to get that attribute is:
<copy path="/application/module/@id" attrvalue="true" property="id_value"/>
but when i echo the property it just gives me the property name $
{id_value} , which means that it has not been read out of my xml structure.
in several cases i have to put a : in front of my path, for reading out
the /application/display-name/text() i have to use
<copy path="/:application/:display-name/text()" property="dn_value"/>
to make it work. but i have read a lot of xpath tutorials but i did not
found a lesson where i have to put colon in front of every node.
so how do i read out this id as mentioned above ? it worked for me 2 weeks
ago but after trying it again today i only get an empty property.
Thats my xml file:
<?xml version="1.0" encoding="UTF-8"?>
<application id="Application_ID" version="1.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
<display-name>EARFILE</display-name>
<module id="WebModule_1213257640343">
<web>
<web-uri>ABCPortlets.war</web-uri>>
<context-root>ABCPortlets</context-root>.
</web>
</module>
<security-role id="SecurityRole_1220508656187">
<role-name>allAuthenticated</role-name>
</security-role>
</application>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Xmltask-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xmltask-users
**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended
solely
for the use of the addressee(s). If you are not the intended recipient,
please
notify the sender by e-mail and delete the original message. Further, you
are not
to copy, disclose, or distribute this e-mail or its contents to any other
person and
any such actions are unlawful. This e-mail may contain viruses. Infosys has
taken
every reasonable precaution to minimize this risk, but is not liable for
any damage
you may sustain as a result of any virus in this e-mail. You should carry
out your
own virus checks before opening the e-mail or attachment. Infosys reserves
the
right to monitor and review the content of all messages sent to or from
this e-mail
address. Messages sent to or from this e-mail address may be stored on the
Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Xmltask-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xmltask-users