Dear Shlomi,
I want the XML output to include double quotes instead of ".
Example:-
In the following code snippet
$test_method->setAttribute("name","\"$count.$attribute_act\" duration-ms=\"0\"
started-at=\"0\"");
I want the output (XML) to be
duration-ms="0" started-at="0"
One more issue. How can I include a newline after each end element so that the
XML output is formatted?
Please explain how can I do it?
Thank you.
best,
Shaji
-------------------------------------------------------------------------------
Your talent is God's gift to you. What you do with it is your gift back to God.
-------------------------------------------------------------------------------
On Friday, 29 November 2013 1:53 PM, Shlomi Fish <[email protected]> wrote:
Hello Shaji,
On Fri, 29 Nov 2013 13:32:49 +0800 (SGT)
Shaji Kalidasan <[email protected]> wrote:
> Dear Perlers,
>
> I am trying to print double quotes in the output (output.xml) but it is
> printing " instead of "". How can I include double quotes "" in the
> output. Please help.
>
In XML, «"» is an XML entity (see
https://en.wikipedia.org/wiki/Character_entity_reference ) which is the same as
giving double quotes - «"» and is often required if specified as the value of a
double quotes-enclosed attribute (e.g: «<mytag myattr="Hello "Foo" />»),
so you should not worry about it being output instead.
Furthermore, I should note that according to
http://cpanratings.perl.org/dist/XML-DOM , XML::DOM has been under-maintained
and largely superseded by https://metacpan.org/release/XML-LibXML (which I
should note that I currently maintain).
Regards,
Shlomi Fish
--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
Beginners Site for the Vim text editor - http://vim.begin-site.org/
Only two things are infinite: the universe, and Chuck Norris’s destruction
ability. And we cannot be sure about the former thanks to the latter.
— http://www.shlomifish.org/humour/bits/facts/Chuck-Norris/
Please reply to list if it's a mailing list post - http://shlom.in/reply .
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/