How to replace XML special characters using Xpress e.g. ' = '
Hellos
I need to write some XML built from resource data.
The resource data strings can contain anything e.g. & ' " < and > characters.
How do I replace these characters with the strings & ' " etc.... from within Xpress?
I try something like:-
<set name='testchar'>
<switch>
<ref>thisLetter</ref>
<case>
<s>'</s>
<s>'</s>
</case>
<case>
<s>"</s>
<s>"</s>
</case>
<case default='true'>
<ref>thisLetter</ref>
</case>
</switch>
</set>
But when saved the <s>'</s> gets saved as <s>'</s>
Is this impossible with Xpress forcing me to invoke my own Java class? (which is a pain to do because of internal politics re restarting of App Server).
Hmmmm seems there is transformation in this set up too.
What I am trying to do is to parse a string which may or may not contain XML special characters into an XML acceptable string.
e.g. transform the surname O'Connor into O&apos ;Connor (with no embedded blank)
I wish to write a rule which uses XPress language to achieve this.
I want to convert the character ' into the string &apos ; (with no blank between apos and ;) and similar for the other XML specials.
Is this possible?
Similar Messages
-
I would like to translate the User Interface of my application to French, Italian, Spanish, German and Portuguese.
When I put special characters in the import string file they showed up as ? (question mark)
The import strings file includes the following parameters for each string: font, text, size and style. (but no field for script)
In order to use a unicode font such as Arial I need to select a french script. But this option is not supported bu LabView (As far as I saw)
A) Is there a font which is directly German/ French etc and not regula font + script parameter?
B) Are there another required step
s for special characters support? (When I put speciual characters in the import string file the showed up as ? question mark)This was discussed last week in this group- read the previous messages.
Look for the thread "Foreign Languages in Labview"
And recite the mantra
ActiveX is good
ActiveX is holy
All Hail Bill
Those who claim otherwise are heretics and not to be trusted
Actually, in this case the non-ActiveX suggestions may be good.
talia wrote in message
news:[email protected]..
> How can I display special characters of NonEuropean languages (French,
> Italian, Spanish, German and Portuguese.) using import string
> mechanism -
How to remove the Special characters like @,#,$<,..from text field. we nedd to remove any specila char from text field .
ex:text = just#fi%cation@text
the text should be justification.hi check this ..
data:char(25) value '5#4#2#&1#&',
char1(9) .
replace all occurrences of '#' in char with 'and' .
replace all occurrences of '&' in char with 'num' .
write: char.
or use this..
data:char(25) value 'test@ing*5#4#2#&1#&',
char1(9) .
replace all occurrences of '#' in char with space .
replace all occurrences of '&' in char with space .
replace all occurrences of '@' in char with space .
replace all occurrences of '*' in char with space .
write: char.
regards,
venkat. -
How can I distinguish special characters or signs in Doc through VBA?
How can I distinguish special characters or signs in Doc through VBA?
I have a few large documents written in word 2003 format and now I work on them under word 2007.
Such large documents containing lots of special characters. I want to change them into Microsoft 3.0 equation form(It is required by the team). I find no way but using function AddOLEObject and Sendkeys through VBA. Common characters can be added
to equation by function Sendkeys, but the return value of Asc() or AscW() for "double arrow", "in" , " not greater than " such special characters or signs, to name but a few are the same ,i.e., 40 And I cannot distinguish them.
I found the link http://msdn.itags.org/word/44333/ may be of use to me, and the title is:
How to read symbols from a DOC documents! (Microsoft Word)
the original question is
Using function "InsertSymbol", I can insert a symbol into a document. But
how can I read a symbol from a document?
Using "Characters(i).range.text", I can read a char. But when meeting a
symbol, the value of "Characters(i).range.text" is always '('.How can I get the CharacterNumber of the symbol.
And the final answer is :
Hi chenfeng,
Word protects symbols from symbol fonts if you insert them from the "Insert
> Symbol" dialog.
This is done so they aren't changed when you change the font or style. But
it also results in Word reporting AscW( ) = 40 on all of them.
I've posted a macro to "unprotect" them (or to protect them again if you
want) ... just today again in
Newsgroups: microsoft.public.word.vba.customization
Subject: Symbol Characters
Date: Mon, 3 May 2004 11:00:46 -0700
Message-ID: <09f401c43138$8f92f900$[email protected]>
It isn't archived on Google yet, but tomorrow you should be able to simply
copy the message ID into http://www.google.com/advanced_group_search.
Regards,
Klaus
But the link for the macro in the final answer is missing.
Can anyone with kindness help me? Thaks a lot.Following Cindy Meister's Advice ,I use MathType SDK.
The sample in MathType SDK in the following may be meaningful,but I do not know how the MTEF for cos^^2Theta, MTEF for sin^^2Theta and MTEF for 1 are generated .
It looks much complicated,and I searched the docs in MathType SDK to get a explanation.Is there any function to generate them? I want to use this method to change commaon text mathematical signs( in special character table) and Greek letters and characters
with subscripts and superscripts to Microsoft 3.0 equation form.
Can anyone with kindness help me?
Sub MTEFTextSubstitution()
Dim MTEFStr1$, MTEFStr2$, MTEFStr3$
Dim stat
'MTEF for cos^^2Theta
MTEFStr1$ = "% MathType!MTEF!2!1!+-" + _
" % feaaeaart1ev0aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn" + _
" % hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr" + _
" % 4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq-Jc9" + _
" % vqaqpepm0xbba9pwe9Q8fs0-yqaqpepae9pg0FirpepeKkFr0xfr-x" + _
" % fr-xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaGaci4yaiaac+" + _
" % gacaGGZbWaaWbaaSqabeaacaaIYaaaaOGaeqiUdehaaa!3B65!"
'MTEF for sin^^2Theta
MTEFStr2$ = "% MathType!MTEF!2!1!+-" + _
" % feaaeaart1ev0aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn" + _
" % hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr" + _
" % 4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq-Jc9" + _
" % vqaqpepm0xbba9pwe9Q8fs0-yqaqpepae9pg0FirpepeKkFr0xfr-x" + _
" % fr-xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaGaci4CaiaacM" + _
" % gacaGGUbWaaWbaaSqabeaacaaIYaaaaOGaeqiUdehaaa!3B6A!"
'MTEF for 1
MTEFStr3$ = "% MathType!MTEF!2!1!+-" + _
" % feaaeaart1ev0aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn" + _
" % hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr" + _
" % 4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq-Jc9" + _
" % vqaqpepm0xbba9pwe9Q8fs0-yqaqpepae9pg0FirpepeKkFr0xfr-x" + _
" % fr-xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaGaaGymaaaa!36A4!"
Selection.Copy
'Init API, reset transform
' If MTUtil.CheckMTDLLVersion = 0 Then Exit Sub
If Not IsDLLVersionOK() Then Exit Sub
MTXFormReset
'first substitution
stat = MTXFormAddVarSub( _
mtxfmSUBST_ONE, _
mtxfmVAR_SUB_PLAIN_TEXT, "<v1>", 0, _
mtxfmVAR_SUB_MTEF_TEXT, MTEFStr1$, Len(MTEFStr1$), 0)
If stat <> 0 Then
MsgBox "1st MTXFormAddVarSub returned: " + Str(stat)
Exit Sub
End If
'second substitution
stat = MTXFormAddVarSub( _
mtxfmSUBST_ONE, _
mtxfmVAR_SUB_PLAIN_TEXT, "<v2>", 0, _
mtxfmVAR_SUB_MTEF_TEXT, MTEFStr2$, Len(MTEFStr2$), 0)
If stat <> 0 Then
MsgBox "2nd MTXFormAddVarSub returned: " + Str(stat)
Exit Sub
End If
'third substitution
stat = MTXFormAddVarSub( _
mtxfmSUBST_ONE, _
mtxfmVAR_SUB_PLAIN_TEXT, "<v3>", 0, _
mtxfmVAR_SUB_MTEF_TEXT, MTEFStr3$, Len(MTEFStr3$), 0)
If stat <> 0 Then
MsgBox "3rd MTXFormAddVarSub returned: " + Str(stat)
Exit Sub
End If
'do the substitution
stat = TransformGraphicEquation
If stat <> 0 Then
MsgBox "TransformGraphicEquation returned: " + Str(stat)
Exit Sub
End If
MTTermAPI
'Paste new equation
Selection.Collapse Direction:=wdCollapseEnd
Selection.PasteSpecial Placement:=wdInLine
End Sub -
Replace function - special characters
Hi All,
If my column is encountering special characters I would like to replace with blank. Special characters may vary from record to record. Sometimes it is @ sometimes $,!,,$,^,<,&,<,>,?,",{,},+,_,),(.
Do we have any function same like replace that can replace all special characters, whatever it encounters with required value?
- please mark correct answersTake a look at this article
T-SQL:
How to Find Rows with Bad Characters
and check See Also section in that article for more articles on that topic.
For every expert, there is an equal and opposite expert. - Becker's Law
My blog
My TechNet articles
Thanks Naomi
- please mark correct answers -
How do I create special characters in 10.5.8
How do I create special characters in 10.5.8, like accents above letters.
Paulfhannan wrote:
like accents above letters.
The most common ones for European languages can be created with the normal US keyboard layout using alt/option dead keys. alt + e, then e gives you é. A list:
http://homepage.mac.com/thgewecke/diacritics.html -
How to check multiple special characters in instr function sql query.
Hi,
The following special characters are comma(,), slash(/), colan(:)
these special characters i need to be check in instr function.
select SUBSTR(master_title,1,INSTR(master_title,',',1,1)-1) from dual;
Can you please write the query with right answer.
Thanks in advance,
Lakshman.Why multiple post?
How to check multiple special characters in this query. -
How do you insert special characters with imovie 08?
How do you insert special characters into a project
with imovie 08?Don't think that would work. Since my "system date" is already set at 2007. I have 2 imports, one has the year as 2048, and the other at 2016!! I don't know where they are getting these dates from, but they are not the system date.
Were the files imported directly from a camcorder or from files already on your hard drive? In the first case the year may have been taken from the time "stamp" recorded when the footage was shot (which may or may not have been correctly set by the user). On the other hand, files imported from the hard drive seem to be keyed to the date the imported file is written to the "Events" folder which, of course, reflects the current system time/date setting. That's why I said you had to then import (re-import) the files from a hard drive source -- i.e., to ensure the DTG would be re-written. -
How to remove all special characters
Hi,
I want to remove all (128-223)the special characters that come in the mapping from the URL
http://www.danshort.com/ASCIImap/
128-223 ,I mean if any characters that come in between these numbered characters I have to remove in mapping.
please suggest.
thank you,
SriHI Sri
You can use the Java code as given above
Other method can be XSLT
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/>
<xsl:template match="/source node">
<target node>
<xsl:value-of select="replace(.,'sepcial character','')"/>
</target node>
</xsl:template>
</xsl:stylesheet>
Thanks
Gaurav -
How to validate UTF-8 characters using Regex?
Hi All,
In one of my applications, i need to include UTF-8 character set for validation of a certain string, which I am validating using a Regex.
However, I do not know how to include UTF-8 characters in a Regex, or if at all, we can specify the UTF-8 charaters ina regex.
Please Help!! Its Urgent!!!
Thanks in Advance,
Rajat AggarwalOk, Let me re-state my problem again, and exactly what i am looking for:
I have an XML file with the following header: <?xml version="1.0" encoding="UTF-8"?>
This XML file contains a tag, whose text is to be validate for a syntax : Operand operator Operand.
Now, the operand on the right hand side of the operator could be a variable, or a string literal, which may contain some permissible special characters (as said above), and may or may not contain UTF-8 characters as well.
I am using the xerces SAXParser to parse the XML document, and am retrieving the text of the elemnt tag with the method <code>element.getChildText("<tagName>")<//code>
According to the org.jdom.Element API Docs,
the getChildText() method is defined as follows:
h3. getChildText{noformat}public java.lang.String getChildText(java.lang.String name){noformat}<dl><dd>Returns the textual content of the named child element, or null if there's no such child. This method is a convenience because calling <code>getChild().getText()</code> can throw a NullPointerException. <br<dd><dl><dt>Parameters: </dt><dd><code>name</code> - the name of the child </dd><dt>Returns: </dt><dd>text content for the named child, or null if no such child
</dd></dl></dd></dl>
Now, I am not sure if the String that I am reading is in UTF-8 Format. Is there any special way of reading a string in that format, or for that matter, convert a string to UTF-8 encoding?
h3. -
Replace all special characters in a String with underscore
I have a String which contains some special characters even(!,$,@,*....).
I need to replace all the special characters with _ in my String. I do have an idea of using String.replace() and analogous forms, but I would be thankful if anyone can suggest me of a better and an efficient way.
regards,
fun_oneKaj,
Thx for your earnest reply. I did have a peep into the API on this method. But the regular expression that I need to use here was beyond my understanding. It did specify some regex that I put to use (something like myString("\D","_"), assuming that I need to replace all non-digit characters ), but it really did not help me getting the result.
Would you spare some code for me reg. the usage of regular expressions in such a scenario?
cheers,
fun_one -
I'm trying to produce some artwork in Photoshop Elements with some French text in it, so I need to know how to input special characters for the letters with accents. Anyone got any ideas - I've tried looking for a glyph menu but that doesn't seem to exist on Elements.
Which operating system are you using and version of photoshop elements?
Photoshop elements doesn't have a Glyphs panel or menu.
Here's a way:
windows
http://symbolcodes.tlt.psu.edu/accents/codealt.html
mac
http://symbolcodes.tlt.psu.edu/accents/codemac.html -
How export datas with special characters from SQL Developer?
Hi.
I'm doing an import of datas of a table, but this table have special characteres in specific accents (á,é,í,ó,ú), my source table have for example "QRCN Querétaro, Candiles" but when I done an export from opcion Tool --> Export DLL (and Datas) from SQL Developer generate the next script
Insert into tablexxx(CADENA,NUMERO_FARMACIA,SUCURSAL_REFERENCIA) values ('C002','20280','QRCN Quer?ro, Candiles');
How can I do for export my datas and generate the script correct?
Insert into tablexxx(CADENA,NUMERO_FARMACIA,SUCURSAL_REFERENCIA) values ('C002','20280','QRCN Querétaro, Candiles');
thanks.Hi sybrand_b,
1. In my SQL Developer I select Tool-->Export DDL (and Data).
2. I Select name file, connection (this is a remote DB), objects to export in this case I select 'Tables and data' and table name to export
3. Run the procedure and generate the script following:
-- File created - jueves-julio-01-2010
-- DDL for Table TABLEXXX
CREATE TABLE "BOLINF"."TABLEXXX"
( "CADENA" VARCHAR2(50 BYTE),
"NUMERO_FARMACIA" VARCHAR2(50 BYTE),
"SUCURSAL_REFERENCIA" VARCHAR2(200 BYTE)
-- DATA FOR TABLE TABLEXXX
-- FILTER = none used
REM INSERTING into TABLEXXX
Insert into TABLEXXX (CADENA,NUMERO_FARMACIA,SUCURSAL_REFERENCIA) values ('C002','20280','QRCN Quer?ro, Candiles');
Insert into TABLEXXX (CADENA,NUMERO_FARMACIA,SUCURSAL_REFERENCIA) values ('C002','20281','QRCG Quer?ro, Corregidora');
Insert into TABLEXXX (CADENA,NUMERO_FARMACIA,SUCURSAL_REFERENCIA) values ('C002','20282','QRFU');
Insert into TABLEXXX (CADENA,NUMERO_FARMACIA,SUCURSAL_REFERENCIA) values ('C002','20283','QRFU');
Insert into TABLEXXX (CADENA,NUMERO_FARMACIA,SUCURSAL_REFERENCIA) values ('C002','20284','SAUN San Lu?P, Universidad');
Insert into TABLEXXX (CADENA,NUMERO_FARMACIA,SUCURSAL_REFERENCIA) values ('C002','20285','SAEV San Lu?P, Eje Vial');
Insert into TABLEXXX (CADENA,NUMERO_FARMACIA,SUCURSAL_REFERENCIA) values ('C002','20286','SALB San Lu?P, Los Bravo');
Insert into TABLEXXX (CADENA,NUMERO_FARMACIA,SUCURSAL_REFERENCIA) values ('C002','20287','SAAL San Lu?P, Alvaro Obreg?');
Insert into TABLEXXX (CADENA,NUMERO_FARMACIA,SUCURSAL_REFERENCIA) values ('C002','20288','SACA San Lu? Callej?n de Cod');
4. But my source table have the next datas.
Select * from TABLEXXX.
CADENA NUMERO_FARMACIA SUCURSAL_REFERENCIA
C002 20280 QRCN Querétaro, Candiles
C002 20281 QRCG Querétaro, Corregidora
C002 20282 QRFU
C002 20283 QRFU
C002 20284 SAUN San Luís P, Universidad
C002 20285 SAEV San Luís P, Eje Vial
C002 20286 SALB San Luís P, Los Bravo
C002 20287 SAAL San Luís P, Alvaro Obregó
C002 20288 SACA San Luís, Callejón de Cod
5. I have done a query to table nls_database_parameters.
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CHARACTERSET UTF8
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZH:TZM
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZH:TZM
NLS_DUAL_CURRENCY $
NLS_COMP BINARY
NLS_NCHAR_CHARACTERSET AL16UTF16
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE
NLS_RDBMS_VERSION 10.2.0.4.0
6. I have revised in Regedit-->HKEY_LOCAL_MACHINE-->SOFTWARE-->ORACLE-->ORACLE HOME and value for NLS_LANG=AMERICAN_AMERICA.UTF8
where should I change for export my datas correct?
or exist any form for export my datas?
thanks a lot.
regards -
How can I remove special characters from spreadsheet filename?
Hi
Having a spreadsheet filename coded (on the Report Attributes page) as &VARIABLE..csv works fine unless the VARIABLE contains special characters such as space, lt, gt and so on.
In the case of space, it is replaced by %20 in the generated filename. Is it possible convert the %20s to underscores (or remove them)?
thanks
TrevorTrevor,
I would use a computation on that page to alter the value of variable, perhaps a SQL Expression such as:
replace (:VARIABLE, ' ', '_')Alternatively, look at the process that puts the value into VARIABLE in the first place and ensure no spaces >, etc are assigned.
Sergio -
How to find the 'special characters' window
Hi,
Frequently I want to access the 'special characters' window, but when I click on the 'special characters' menu item the window does not appear. Sometimes I later find it on another screen (I use nine screens in Spaces), and sometimes can I see it on another screen using Expose, but when I go there it has disappeared. It seems a very fugitive tool, and in its way displays some cute, personality........ But I would love to know how to find it or to force it to appear on the same screen as the application from which I tried to open it!
all the best,
Jeremy HarbinsonHi,
Thanks for the reply.
I tried what you suggest - in the International section of the System Preferences there is a tab labelled 'input menu' and there is a check box (which is checked) titled 'Show input menu in Menu bar'. Unchecking that removes a national flag from the the menu bar, checking it restores that flag. So far, so good. If a click on the flag, a drop down menu appears with 'Hide character palette' as an item - clicking this changes it state to 'Show character palette' but clicking this (several times) changes nothing else that I can see,
all the best,
Jeremy
Maybe you are looking for
-
Switching back to U.S. store from U.K. Store?
How do I?
-
Avoid Commit after every Insert that requires a SELECT
Hi everybody, Here is the problem: I have a table of generator alarms which is populated daily. On daily basis there are approximately 50,000 rows to be inserted in it. Currently i have one month's data in it ... Approximately 900,000 rows. here goes
-
iTunes itself is working fine but I cannot open the Store. It flashes and I can see the page for a second but the download indicator at the top only goes to about 92%. Then where the iTunes store choices are supposed to be, the screen turns white and
-
IMac Display is jittering or subtly flickering
i just bought a iMac off of eBay. 2ghz Intel Core 2 Duo. One of the white ones from i think three years ago. the last couple of days the display has started to faintly have those ghost lines jittering. i wish i knew the best way to describe this.. it
-
Does the ACS 4.0 support for Simply Chinese Version of Windows 2003 Ent.
dose anyone sucessfully install the ACS 4.0 on the chinese version of Win2003 Ent? does it need any additional packages or patches related to windows OS?