How to create an xml file with XMLWriter that has 0A newlines in strings
"Nagy Tamas (TVI-GmbH)" <[email protected]> Tue, 2 Jun 2015 14:14:00 +0000
| Newsgroups | gmane.comp.lang.perl.xml |
|---|---|
| Message-ID | <[email protected]> |
--===============0798634060==
Content-Language: de-DE
Content-Type: multipart/alternative;
boundary="_000_8CC051EDBFD89048914F6F9F293FCB7DEA3294server8localtvigm_"
--_000_8CC051EDBFD89048914F6F9F293FCB7DEA3294server8localtvigm_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Hi,
I have to create a special binary format that uses XML.
I create an XML file with XMLWriter. After that I use Notepad++ to convert =
it to UTF-8 file.
The problem is, that also 0D 0A is written into the strings by Notepad++.
How to delete the 0D-s from the strings after conversion? Many hex editors =
support
only overwriting. Which hex editor can delete it?
Or how to create UTF-8 XML files with XMLWriter so that strings never conta=
in 0D 0A,
just 0A.
It seems to be impossible with perl XMLWriter.
Visual Studio has a special XML format when a plugin is used. In this XML f=
ormat
0D 0A is everywhere in the XML except the strings, where there is only 0A.
How is it possible to generate this file?
Tamas Nagy
--_000_8CC051EDBFD89048914F6F9F293FCB7DEA3294server8localtvigm_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"=
>
<meta name=3D"Generator" content=3D"Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.E-MailFormatvorlage17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3D"DE" link=3D"#0563C1" vlink=3D"#954F72">
<div class=3D"WordSection1">
<p class=3D"MsoNormal">Hi,<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p> </o:p></p>
<p class=3D"MsoNormal">I have to create a special binary format that uses X=
ML.<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p> </o:p></p>
<p class=3D"MsoNormal">I create an XML file with XMLWriter. After that I us=
e Notepad++ to convert it to UTF-8 file.<o:p></o:p></p>
<p class=3D"MsoNormal">The problem is, that also 0D 0A is written into the =
strings by Notepad++.<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p> </o:p></p>
<p class=3D"MsoNormal">How to delete the 0D-s from the strings after conver=
sion? Many hex editors support<o:p></o:p></p>
<p class=3D"MsoNormal">only overwriting. Which hex editor can delete it?<o:=
p></o:p></p>
<p class=3D"MsoNormal"><o:p> </o:p></p>
<p class=3D"MsoNormal">Or how to create UTF-8 XML files with XMLWriter so t=
hat strings never contain 0D 0A,<o:p></o:p></p>
<p class=3D"MsoNormal">just 0A.<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p> </o:p></p>
<p class=3D"MsoNormal">It seems to be impossible with perl XMLWriter.<o:p><=
/o:p></p>
<p class=3D"MsoNormal"><o:p> </o:p></p>
<p class=3D"MsoNormal">Visual Studio has a special XML format when a plugin=
is used. In this XML format<o:p></o:p></p>
<p class=3D"MsoNormal">0D 0A is everywhere in the XML except the strings, w=
here there is only 0A.<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p> </o:p></p>
<p class=3D"MsoNormal">How is it possible to generate this file?<o:p></o:p>=
</p>
<p class=3D"MsoNormal"><o:p> </o:p></p>
<p class=3D"MsoNormal"><span style=3D"font-size:8.0pt;font-family:"Ver=
dana",sans-serif;color:#1F497D;mso-fareast-language:DE">Tamas Nagy<o:p=
></o:p></span></p>
<p class=3D"MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>
--_000_8CC051EDBFD89048914F6F9F293FCB7DEA3294server8localtvigm_--
--===============0798634060==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Perl-XML mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============0798634060==--