EOL is lost after parsing with Xerces - xerces

eol chars are substituted by white spaces by xerces parser in attribute value
<prolog>
<metadata name="my_name" value="my
value"/>
</prolog>
Is there any way i can keep eol?

found it $#10;
is doing the work, the xerces parser translates it automaticly into new line char.

Shouldn't the text be inside a CDATA if you want chars like an EOL?

Related

TYPO3 TCA Defalut text multiline/textarea

Can i set a default "multiline value" for textareas in TYPO3 TCA ?
if i use \n for example the output is always \n not a linebreak. The "Default" tag is an integer or String (TYPO3 docu), so it seems not to be possible to enter a default multilined text to a textarea right?
<config>
<type>text</type>
<rows>3</rows>
<cols>30</cols>
<eval>trim</eval>
<default>WILD AND FREE \n SINCE 2008</default>
</config>
You have to adapt to the kind of definition you use.
In general TCA is defined in a PHP file, but you use XML. XML don't know about escaped characters like \n. but the content of tags could include linebreaks, so it would be possible to split the default tag and end it some lines later.
Be aware of indentions!

How to encode text when generating an xml file using rythm

I have to encode text in an error message tag while generating an xml file. My tag is
"ErrorMessage" any text with special character suchs as <>#$%^& "/ErrorMessage". Is there a way to encode those special characters when generating file using rythm template engine?
They should be escaped automatically unless you use .raw() extension. If some chars are not escaped properly please submit an issue on github

Special characters in CDATA code block

I'm trying to render a trademark(™) character in an XML file someone else has created.
The code is as follows:
<head><![CDATA[Product Name™]]></head>
It currently fails to render the special character correctly.
I'm using UTF-8 encodin:
Any help greatly appreciated!
By definition, CDATA section content is taken as such, not parsed even for character references like ™. See What does <![CDATA[]]> in XML mean?
Independently of this, ™ is undefined, though commonly interpreted by browsers as denoting the trade mark character. Correct references for trade mark character are ™ and ™.
If the document encoding is UTF-8, you should enter the character “™” as such. Inside CDATA sections, it’s really the only way.

UIWebView, quote characters with Arial font not showing up correctly

I have some .html with the font defined as:
<font color="white" face="Arial">
I have no other style applied to my tag. In it, when I display data like:
<b> “Software” </b>
or
<b>“Software”</b>
they both display characters I do not want in the UIWebView. It looks like this on a black background:
How do I avoid that? If I don't use font face="arial", it works fine.
This is an encoding issue. Make sure you use the same encoding everywhere. UTF8 is probably the best choice.
You can put a line
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
in your html to tell UIWebView about the encoding.
To be precise, “ is what you get when you take the UTF-8 encoding of “, and interpret it as ISO-8859-1. So your data is encoded in UTF-8, which is good, and you just need to set the content type to UTF-8 instead of ISO-8859-1 (e.g. using the <meta> tag above)
You shouldn’t generally use the curly quote characters themselves—character encodings will always mess you up somehow. No idea why it works correctly when you don’t use Arial (though that suggests a great idea: don’t use Arial), but your best bet is to use the HTML entities “ and ” instead.

how to parse XML which contains data in Norwegian language?

how to parse XML which contains data in Norwegian language ?
Does i need any type of encoding with NSParser ?
Thanks.
I guess you are worried about non-ASCII characters in the XML file. Well you don't need to. The first line of an XML file should look something like:
<?xml version="1.0" encoding="UTF-8"?>
where the encoding attribute tells you which character set was used to encode the characters in the file. NSXMLParser will use that line to determine which character set it will use. Once it gets to your methods, all the text will be in NSStrings which will be able to cope with your Norwegian characters automatically.
All you need to be concerned about is that the file really is encoded in the character set that the first line says it is.
The xml is the language which don't concern which kind of language you are using!! In xml there should be one start tag and it's end tag. Then you can parse using xml parsing.
here is the tutorial to understand xml and
here is the link to tutorial to parse the xml file.
may this will be help full to your problem.