Thank you for the prompt response.
the Unix "\n" appearing inside the comment block or outside? Inside
-----------------------
I am running on Windows XP.
My original file comment was:
<!-\r\n
comment\r\n
-->\r\n
After the file got nodes added (so it was rewritten) through xmltask, the
comment showed as:
<!-\n
comment\n
-->\r\n
All the other lines have \r\n as end-of-line
I noticed that the one causing this, was the attribute "outputter".
This problem happens when outputter is unassigned or it is outputter="default".
After I set out outputter="simple:4" or outputter="simple", the line-endings
are all OK (\r\n).
BUG: the default outputter is not handling the end-of-line for comments
according to the OS.
So the following xmltask is working now:
<xmltask source="${tmp.dir}/ehcache-config.xml"
dest="${tmp.dir}/ehcache-config.xml" encoding="UTF-8"
outputter="simple:4">
<paste path="//cache[last()]" buffer="mergeXml"
position="after"/>
</xmltask>
From: Mark Coffin [mailto:mcof...@aalsolutions.com]
Sent: Friday, September 03, 2010 6:58 AM
To: Saavedra, Gisella; xmltask-users@lists.sourceforge.net
Subject: RE: [Xmltask-users] XML comment line end-of-line
Hi Gisella,
You can probably run the fixcrlf ant task to correct this, info for 1.7 is
here: http://ant.apache.org/manual/Tasks/fixcrlf.html
Which platform did you run the Xmltask on?
Also, are the Unix "\n" appearing inside the comment block or outside?
For example:
<! -- this is a comment \n
-->
Mark Coffin
mcof...@aalsolutions.com<mailto:mcof...@aalsolutions.com>
Phone: 905.632.0864
1.800.668.8486
Fax: 905.632.2605
www.aalsolutions.com<http://www.aalsolutions.com/>
________________________________
From: Saavedra, Gisella [mailto:gsaave...@zebra.com]
Sent: Thursday, September 02, 2010 6:46 PM
To: xmltask-users@lists.sourceforge.net
Subject: [Xmltask-users] XML comment line end-of-line
I have two XML files. I am merging data from file 2 into file 1.
In file 1, I have some comments, written in the traditional way( <!-- comment
-->)
When I execute the xmltask, any nodes inserted in my destination file are OK,
although the whole XML contents is rewritten (I could see the non-wrapping for
each node).
But the original comments get the original "\r\n" end -of -line replaced
with "\n" as per UNIX. All the nodes I added get added with "\r\n" as the
end-of-line.
So, I get all the end of lines as "\r\n" (Windows) but my comment lines have
"\n" (UNIX)
Is this a bug?
What can I do?
Thanks,
Gisella
--------------------
Comments in XML
The syntax for writing comments in XML is similar to that of HTML.
<!-- This is a comment -->
________________________________
- CONFIDENTIAL-
This email and any files transmitted with it are confidential, and may also be
legally privileged. If you are not the intended recipient, you may not review,
use, copy, or distribute this message. If you receive this email in error,
please notify the sender immediately by reply email and then delete this email.
****** CONFIDENTIALITY NOTICE ******
NOTICE: This e-mail message and all attachments transmitted with it may contain
legally privileged and confidential information intended solely for the use of
the addressee. If the reader of this message is not the intended recipient, you
are hereby notified that any reading, dissemination, distribution, copying, or
other use of this message or its attachments is strictly prohibited. If you
have received this message in error, please notify the sender immediately and
delete this message from your system. Thank you.
------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:
Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Xmltask-users mailing list
Xmltask-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xmltask-users