Character Interpretation
I am having some issue with the interpretation of special characters by Oracle
One of my function returns a string based on a input number. This string can contain special characters as well (some of which are actually 2 byte like CHR(50053) which should return Å).
But when I try to run this function in Toad/SQLDeveloper , it is returning an inverted question mark/square box respectively.
What is more baffling is that when I run the same function in another schema of the SAME database , it returns the correct character value. Is there any schema level setting to control the same ?? (which doesnt look the case as select chr(50053) from dual is working correctly in the erraneous schema.)
Any pointers will be really appreciated...
Looks like Duplicate post
Similar Messages
-
Problem with converted PDF from OTF
Hello,
im having a problem with character interpretation in PDF document when i convert it from OTF.
At the moment im using Arial true type font in my smartform, im using function module CONVERT_OTF to convert OTF to PDF.
When i open PDF document with Adobe reader it looks fine, but the problem is when im trying to convert PDF file to other format for example PNG, or trying to copy and paste text from PDF document.
im getting Klaipìda instead of Klaipėda, it seems that baltic symbol "ė" is interpreted like "ì", other baltic symbols are interpreted as they should, there is problem only with character "ė".
have anyone faced that kindof problem? or maybe anyone know the solution for this problem? if so please tell me.
Best regards,
Rimantas Sebeckis.Hi Rimantus,
Did you check the fonts installed in your system,,,
As PDF is a unchangeable format, it doesnt depend upon the installed fonts in the system,,
but when you copy, you need some fonts in system,, if not you will get the same problem,,,
Thanks & regards,
Dileep.C -
Non-Latin Characters lead to finder distress.
One of the nicest features of Macintosh from the time I first played on an SE30 is the capacity to quickly type non-Latin characters. While to many this might not seem like a big deal, for me being able to write Tetris™ without a second thought is a great convenience.
So I was very surprised when I began typing µ in the Finder under Snow Leopard and didn't end up on a file that started with µ but rather on m. As if that wasn't irritating enough µ is not treated as m so the file becomes completely unreachable by alphabetic selection. This is something I use almost constantly in Finder so having a file unreachable is even worse than merely having the character interpreted incorrectly.
Just to be certain that this wasn't merely a flaw with that one character I examined other common characters.
ƒ, é, π, ∑ all suffer from the same problem, misinterpreted when typed and interpreted correctly during the comparison.
So the question is, “Is this an error in how I set up my machine, an error in the string comparison system, or an error in the Finder program?”Yes, I just double checked, and I was in error, accented Latins do work as expected. I am certain that the inclusion of such in the prior list was a user error.
However the fact that the Greek key layout works begins to suggest the root of the problem.
Interestingly enough this also applies to the Greek layouts internal option modified keys.
I am strongly suspecting a bug here. -
Sequence path expression for remote execution
I usually specify path name expressions with double backslashes to avoid problems when a backslash is followed by a character interpreted as an escape sequence (e.g. C:\test, where \t would be the Escape sequence for a TAB).
Now I tried to execute a sequence on a remote computer. The sequence was specified in an expression string as "D:\\TestStand\\Sequences\\Test.seq" and I got the message that the sequence file could not be found on the remote computer. Using the expression string "D:\TestStand\Sequences\Test.seq" worked fine.
What is the safest way to handle strings with path expressions in TestStand consistently?
Regards
PeterHi Johann,
thank you. Problem is that it is not necessarily the path of my current sequence file, but some path that I build in an expression. So I do not have a source generated by TestStand which should always work.
As far as I understand the documentation, "C:\test" would expand to "C: est" (the spaces representing a tab), "C:\Test" would remain as is, "C:\\test" would expand - or rather shrink - to "C:\test".
So for safety, I would always build paths with double backslashes, but that does not work with the Remote Engine (i.e., not a different tool, but a part of TestStand itself).
So the question is, can I rely on a single backslash to be treated correctly in a path name and not expand into an Escape sequence? Or can, possibly, the remote engine work with forward slashes in paths?
Best regards,
Peter -
Error code 1064 mysql and crystal reports XI
Post Author: aminski
CA Forum: Data Connectivity and SQL
Hello friends , I am trying to create a Crystal Report connected to a MySQL database using an ODBC (RDO) connection. I created a DSN using the MySQL Connector/ODBC 3.51 and mysql database 3.23.51 version . When creating a new report I can add the ODBC (RDO) connection using Add Command Option, I place my query into the Add Command Text Box then i click on Ok button and i get an error message that reads as follows: << Failed to retrieve data from database, details 2300 mysql odbc 3.51 driver mysqld 3.23.51 you have an error in your sql syntax near ;create temporary table if not exists cursa (cbod_puc varchar(14), saldo floa at line 1 database vendor code 1064.>>
The error message doesn't display the whole SQL statement, so I can't tell if Crystal Reports is making a bad SQL statement or if it is a problem with the MySQL ODBC driver. or with the delimiter character ( ; ) interpreted by crystal or the odbc driver
this is my complete query:
DROP TABLE IF EXISTS cursa; create temporary table if not exists cursa (cbod_puc varchar(14), saldo float(12,2));insert into cursa select cbod_puc,sum(if(cbod_tipo='D',cbod_valor,0))-sum(if(cbod_tipo='C',cbod_valor,0))from myacbodymovimientoswhere cbod_puc='110505003' and cbod_fecha<='2007-08-31' and cbod_estado not in ('a','A')group by cbod_puc;
select x.cbod_ccosto, x.cbod_documento, x.cbod_fecha,cbod_concepto, x.cbod_tipo, ccos_nombre, x.cbod_puc, a.puc_nombre, x.cbod_razonconcepto, if(x.cbod_tipo='D' and x.cbod_estado not in ('a','A'),x.cbod_valor,0) as debito, if(x.cbod_tipo='C' and x.cbod_estado not in ('a','A'),x.cbod_valor,0) as credito, substring(x.cbod_puc,1,1) as puc_clase, substring(x.cbod_puc,1,2) as puc_grupo, substring(x.cbod_puc,1,4) as puc_mayor, substring(x.cbod_puc,1,6) as puc_submayor, ifnull(b.puc_nombre,'') as puc_NombreClase, ifnull(c.puc_nombre,'') as puc_NombreGrupo, ifnull(d.puc_nombre,'') as puc_NombreMayor, ifnull(e.puc_nombre,'') as puc_NombreSubMayor, chea_chequeno,saldo, x.cbod_fecha as Ffinicio,x.cbod_fecha as Fffinalfrom myacbodymovimientos as x left join myacheadmovimientos on chea_ccosto=x.cbod_bodega and chea_documento=x.cbod_documento and chea_concepto=x.cbod_concepto and chea_beneficiario=x.cbod_beneficiario left join myaccosto on ccos_codigo=x.cbod_ccosto left join myacpuc a on a.puc_codigo=x.cbod_puc left join myacpuc b on b.puc_codigo=substring(x.cbod_puc,1,1) left join myacpuc c on c.puc_codigo=substring(x.cbod_puc,1,2) left join myacpuc d on d.puc_codigo=substring(x.cbod_puc,1,4) left join myacpuc e on e.puc_codigo=substring(x.cbod_puc,1,6) left join cursa f on f.cbod_puc=x.cbod_pucwhere x.cbod_puc='110505003' and x.cbod_fecha BETWEEN '2007/01/01' and '2007/09/07'order by x.cbod_puc, x.cbod_fecha, x.cbod_concepto, lpad(trim(x.cbod_documento),12,'0')
I tested this query using HeidiSQL program Version 3.0 Revision 572 and it runs perfectly without errors, please help me to know if the problem is my odbc driver version or what is the right delimiter character that i have to use in crystal reports XI in order to run perfectly
Thanks -AminskiI developed a JSP page that displays a Crystal Report using NetBeans 4.1, and it works fine.
Then I set up a project in SJSC with exactly the same libraries, context parameters, etc., and I copied over my JSP page, making it the starting page of the SJSC project, but I get the same "Unexpected error determining relative path". It's got to be a problem with the way SJSC sets up the servlet context or something, but I need help from some of you guys out there with some pretty serious knowledge of SJSC's plumbing...
Thanks,
Luca -
I can't resolv a problem, please help me...
Hi,
The problem is in this code, I try create a Text File with bytearray, but the result doesn't expected :
The problem is on the part of sale.write(body).
I don't received the text correct in the file. The description of the problem is before the code. Please help me, with that problem.
Code:
javax.jms.BytesMessage bytesMessage = (javax.jms.BytesMessage) aMessage;
try
while (true)
int numBytesRead = bytesMessage.readBytes(buffer);
if (numBytesRead == -1)
break;
byte[] tmp = new byte[body.length + numBytesRead];
System.arraycopy(body,0,tmp,0,body.length);
System.arraycopy(buffer,0,tmp,body.length,numBytesRead);
body = tmp;
try
java.io.File file = new java.io.File("paso0409.txt");
java.io.FileOutputStream outputStream = new java.io.FileOutputStream(file);
java.io.DataOutputStream sale = new java.io.DataOutputStream(outputStream);
for(int i = 0; i < body; i++){
sale.write(body);
catch(java.io.IOException jaio)
catch (javax.jms.JMSException jsme)
The file, show me the next text:
qS ��ISO8859-1 � ������EDI_DC40
but the correct text is only ("EDI_DC40"), blank spaces and other text.
How I do, to see only text and not see bytes character ??
Thank's to help me !!
Hervey P.Is the line:
for(int i = 0; i < body; i++){
really supposed to be:
for(int i = 0; i < body.length; i++){
Assuming that's right, one problem I see is the method DataOutputStream.write(byte[] bytes) writes the whole array, but you have a loop that writes the same data body.length times.
On the other hand, it you are going to write a byte array to a file, then you can use the FileOutputStream directly, without using a DataOutputStream.
Your post does not show how the byte array body gets filled. My guess is that's where your problem lies. You might try putting a line in somewhere to display what the contents of the body array is.
System.out.println(new String(body));
should show you the character interpretation of the array of bytes. -
Create folders with multiple language support
How can folders be created supporting multiple languages?
I am using Mac OS X with English as my native language. As I would like to have several folders named in Japanese this causes some trouble: It is no problem to name them using Japanese characters, but if I navigate through these folders using the Terminal as I often do the names will only appear like "???????????????????" even if I use 'export LCALL="jaJP.UTF-8"' to get right character interpretation for the Terminal. There must be an alternative name support for folders as I tried to create folders while I switched to Japanese as my native language for Mac OS X and all standard user folders switched to Japanese language. In the Terminal these folders still appear in international English language. And also when I copy those folders to an external hard drive the multiple language support will stay alive. But I still didn't find out how new folders created by myself will get multiple language support. Any hints?
Thanks in advance.
KyoshiroTom Gewecke wrote:
Unfortunately I have to switch between Romaji and Hiragana/Katakana input method every time I have to spell japanese folder names. (Tab completion doesn't work at all for these folders.)
Sorry, I don't understand what you mean there. Where are you spelling the names? In Terminal?
Yes, I meant typing Japanese characters in the Terminal. It works but it's very uncomfortable as shortcuts to switch the input method don't work while writing commands in the Terminal. Standard folders like "Documents", "Pictures" etc. appear in English in the Terminal even if the localization has been switched to an other language. (So there is no need to switch the input method while working in the Terminal.)
In case the folders are stored on an external drive (even if it's fat) and it's plugged in on another computer they appear in English likewise.
Self created folders normally won't have this ability. But to customize this behaviour is exactly what I am looking for. I guess the information about the "international aliases" must be in a hidden file or something like that.
That must certainly be part of the localization system for the OS. Here is some info:
http://developer.apple.com/internationalization/localization/tools.html
Thank you for the link, first I'll explore the tools. Maybe I'll find some useful information.
I'll return as soon as I need help again or if I found what I am searching for.
Thank you so far.
Kyoshiro -
IPlanet CMS 4.7 and PGP 8.03
Hello, I am trying to use iPlanet CMS 4.7 as a CA for PGP.
Does anyone know how to configure iPlanet CMS in order to work with PGP?
Thanks for your feedback!
Cheers, StefanHi there,
I believe that the issue you are encoutering looks like the following:
"The CMS installation wizard fails when creating the internal database.
I'm running the installation wizard and it fails to accept the information I enter for the internal database. I'm getting the "Invalid Credentials" error message.
When creating the internal database, which is an instance of Netscape Directory Server 4.1, the CMS installation wizard performs some LDAP operations by calling command-line tools, such as ldapmodify. These tools are invoked by /bin/sh on Solaris. One of the command-line arguments to the tool is the bind password. If this password has any other character interpreted by the shell (for example, #, $, %, *, (, ), -, ', ", ?, \, |, ~, or `), the password gets mangled by the shell, causing ldapmodify to fail (with an "Invalid Credentials" error), which in turn causes the wizard to fail.
To workaround the problem, use an alphanumeric password for the internal database. [# 357672]"
The above information was found in an old FAQ of CMS 4.1x.
Hope this would help.
Cheers / Damien. -
Anyone would like to use/comment on the code below? This method intends to translate the hex based "illegal" characters in an URI into normal fileSys characters (useful in thin client fileSharing server apps). It also helps those who need help translating String into hex & hex into String. I'd appreciate some testing or someone to make it leaner. Nx.
// URI hex decoder
public String FixIllegalCharacters(String realRequest){
int idxOfPcent = 0;
while((idxOfPcent = realRequest.indexOf("%", idxOfPcent)) != -1){
realRequest = realRequest.substring(0, idxOfPcent) + new String(new byte[]{(byte) Integer.parseInt(realRequest.substring(idxOfPcent+1, idxOfPcent+3), 16)}) + realRequest.substring(idxOfPcent+3);
idxOfPcent++;
return realRequest;
}I have code to do a similar thing, but iteratively until there are no escape sequences left, and watching for attempts to use .. - generally attempted exploits against IIS. Code follows: /**
* Process the %nn symbols in the URL, and check for ..
* @param url The URL requested
* @return A String representing the same URL, but properly parsed
* @throws SecurityException if the URL appears to be an attempted exploit
* @author Peter Taylor
public static String processURL(String url) throws SecurityException
char[] characters = url.toCharArray();
StringBuffer output = new StringBuffer(url.length());
char[] buffer = new char[10];
int charsInBuffer = 0;
boolean readDot = false; // if we read a dot when this is true, throw exception
for (int i = 0; i < characters.length; i++)
char ch = characters;
if (charsInBuffer == 0 &&
ch != '%' &&
ch != '.')
readDot = false;
output.append(ch);
else if (ch == '.' && !readDot)
readDot = true;
output.append(ch);
else if (ch == '.' && readDot)
throw new SecurityException("Attempted to subvert directory hierarchy");
else if (ch == '%')
buffer[charsInBuffer++] = ch;
else // there are characters in the buffer
buffer[charsInBuffer++] = ch;
// Check whether this character proves that we don't have a sequence representing a
// character. If not, check whether it completes such a sequence.
if (!isHexDigit(ch) &&
!(charsInBuffer == 1 &&
(ch == 'u' || ch == 'U')))
// We don't have a special sequence, so flush the buffer
for (int j = 0; j < charsInBuffer; j++)
output.append(buffer[j]);
charsInBuffer = 0;
else if ((buffer[1] != 'u' && buffer[1] != 'U') &&
charsInBuffer == 3)
// The two last characters represent the special character in ASCII hex
ch = (char)((getHexValue(buffer[1]) << 4) + getHexValue(buffer[2]));
// Reinsert into the stream to be processed - a bit hacky
characters[i--] = ch;
charsInBuffer = 0;
else if ((buffer[1] == 'u' || buffer[1] == 'U') &&
charsInBuffer == 6)
// The last four characters represent the special character in Unicode hex
ch = (char)((getHexValue(buffer[2]) << 12) +
(getHexValue(buffer[3]) << 8) +
(getHexValue(buffer[4]) << 4) +
getHexValue(buffer[5]));
// Reinsert into the stream to be processed - a bit hacky
characters[i--] = ch;
charsInBuffer = 0;
// Flush buffer
for (int j = 0; j < charsInBuffer; j++)
output.append(buffer[j]);
return output.toString();
* A simple method to check whether a character, interpreted as an ASCII character,
* is a hexadecimal digit.
* @author Peter Taylor
public static boolean isHexDigit(char ch)
String hexDigits = "0123456789abcdefABCDEF";
return (hexDigits.indexOf(ch) > -1);
* A simple method to convert an ASCII character which represents a hexadecimal
* digit into the value it represents.
* @return The value represented by this digit, if it represents a hex digit.
* -1 otherwise.
* @author Peter Taylor
public static char getHexValue(char ch)
int i;
if (ch >= '0' && ch <= '9')
i = (ch - '0');
else if (ch >= 'a' && ch <= 'f')
i = (ch - 'a' + 10);
else if (ch >= 'A' && ch <= 'F')
i = (ch - 'F' + 10);
else i = -1; // Can't be bothered with an exception
return (char)i; -
I have an sgm file which contains special characters in different languages.
<!DOCTYPE MANUAL PUBLIC "-//SWE-XXX//DTD XXX MANUAL-DTD 2.0//EN">
<MANUAL LANG="CS">
<TITEL>
Polish characters: óê¿ñæÑÆÊ¥Ó£
Czech characters: éìóïáøèíùòú&Og rave;ÌÉÓÚÙÈØÍÁÏ aacute: á</TITEL>
</MANUAL>
Is there any way to insert special character directly in sgm file, so that it won't have to be interpreted by isoents mapping rules?
isoent.rwr interpretes oacute as:
entity "oacute" is fm char 0x00F3;
But I would like to use 0x00F3 directly in fm file, so that if any additional character is needed - I won't have to update isoent files
I've tested already:
ó
&x00F3;
&0x00F3;
but with no luck
Is there anyone who could help me with it?
I will really appreciate your help
/JoannaHi Michael. Thank you for your reply.
There is no declaration within sgm file itself - but while opening the file I use sgml application definition with the following settings:
Default API client: FmTranslator
SGML character encoding: ISO Latin1
XML character encoding: UTF-8
Namespace: Enable
CSS2 Preferences:
Generate CSS2: Disable
Add Fm CSS Attribute To XML: Disable
Retain Stylesheet Information: Disable
Entity locations
Entity search paths
C:\Program Files\Adobe\FrameMaker9\Structure\sgml\isoents
So as you can see, character encoding is set to ISO Latin1 (there is no way to use UTF-8 encoding in sgml files)
Typing ź or ć in sgm document and opening it with framemaker sgml application - I receive: ¿æ and message: "Non-SGML character found; should have been character reference"
Everything works fine when I type f.ex.: &x016B; and insert appropriate reference lines into isolat1.rw and isolat1.ent files
But what I would like to avoid is editing those isoent files each time new character is be needed. -
IPod Video Notes - Tab Character not interpreted
Hello,
I'm having some difficulty with the formatting of text displayed on the iPod Video.
For some reason, my iPod refuses to interpret the TAB character. It simply omits it, concatenating the adjacent text into one long string. I created text files in nano, saving them in both the default and "mac" modes, as well as in the MAC application "textedit" and neither worked.
An obvious solution would be to use spaces to replace the tabs, however for some reason the iPod appears to use a proportional font, which screws up the alignment.
Can anyone tell me how to get the iPod to see the TABs or to change to a non-propotional font?Me again,
James Lee, at Tropical Software was kind enough to respond to an e-mail and explain that this is an inherent flaw in the ipod's ability to render text.
I'm really stunned that the iPod notes function can't display a tab character. That's just silly. The TAB has been a part of ascii since before FM radio was cool.
C'mon Apple - fix this one!
And let me plug Tropical Software. Anyone with customer service like they have, deserves it! Check out their Tropical Notes for iPod at www.tropic4.com
I figured I'd answer my own question in case someone else googles for this...
cheers
iMac Mac OS X (10.4)
iMac Mac OS X (10.4) -
How does TestStand interpret the /T character in csv file
I have the following entry in a TestStand 4.0.1 csv file. PET_PAELOG_Path,C:\Program Files\TrippLite\PowerAlert\data\paelog.txt
The \T is being interpreted as a tab character when read in with a property loader step type. The file format is set to "Comma Delimited Text (.csv).
Should this be happening?Hi,
Yes, you need to double up the \ character.
Regards
Ray Farmer
Regards
Ray Farmer -
Interpret/Convet XML to ABAP/character
Hi,
I am consuming a web-Service (posted on internet) via client-proxy method. for this I've created the client proxy and called one of the methods in the class.
After passing the input values (country Code) to the web-service I am receiving the result (country Name) in a varliable (string format) but, the format of the returned data is XML.
example:
<NewDataSet> <Table> <countrycode>in</countrycode> <name>India</name> </Table> <Table> <countrycode>in</countrycode> <name>India</name> </Table> </NewDataSet>
How can I get the vaule mentioned in variable <name> in the output ??
Is there a way to convert this XML into character format and read the value in the variable <name> or parse every field from the output in the internal table what can be the approch and solution to do this ?
/MikeHello Mike
You may have a look at the SAP online documentation:
[ABAP Mappings|http://help.sap.com/saphelp_nw04/helpdata/en/ba/e18b1a0fc14f1faf884ae50cece51b/content.htm]
If you check the sample program you will find the following coding which might be useful for your purposes:
* get message content of tag <BookingCode>
data: incode type ref to if_ixml_node_collection.
incode = idocument->get_elements_by_tag_name( 'BookingCode' ).
Regards
Uwe -
Convert/Interpret XML to Character/ABAP
Hi,
I am consuming a web-Service via client-proxy method. for this I've created the client proxy and called one of the methods in the class in the program.
After passing the input values (country Code) to the web-service I am receiving the result (country Name) in a varliable (string format) but, the format of the returned data is XML.
example:
<NewDataSet> <Table> <countrycode>in</countrycode> <name>India</name> </Table> <Table> <countrycode>in</countrycode> <name>India</name> </Table> </NewDataSet>
How can I get the vaule mentioned in variable <name> in the output ??
Is there a way to convert this XML into character format and read the value in the variable <name> or parse every field from the output in the internal table what can be the approch and solution to do this ?
/MikeTry using the code below for xml parsing...
TYPE-POOLS: ixml.
TYPE-POOLS : abap.
FIELD-SYMBOLS: <dyn_table> TYPE STANDARD TABLE,
<dyn_table1> TYPE STANDARD TABLE,
<dyn_wa>,
<dyn_fieldvalue>,
<dyn_wa1>,
<dyn_field>,
<dyn_field1>,
<fs_1> TYPE table,
<fs_2> TYPE ANY,
<fs_3> TYPE ANY,
<fs_5> TYPE ANY.
FIELD-SYMBOLS: <fs_fields>.
DATA: dy_table TYPE REF TO data,
dy_line TYPE REF TO data,
dy_datatype TYPE REF TO data,
dy_table1 TYPE REF TO data,
dy_line1 TYPE REF TO data,
new_line TYPE REF TO data,
xfc TYPE lvc_s_fcat,
ifc TYPE lvc_t_fcat.
TYPES: BEGIN OF t_xml_line,
data(256) TYPE x,
END OF t_xml_line.
TYPES: BEGIN OF gs_elem_value,
element(30) TYPE c,
value(30) TYPE c,
recordid TYPE i,
END OF gs_elem_value.
DATA: gi_elem_value TYPE TABLE OF gs_elem_value ,
gw_elem_value TYPE gs_elem_value.
DATA: l_ixml TYPE REF TO if_ixml,
l_streamfactory TYPE REF TO if_ixml_stream_factory,
l_parser TYPE REF TO if_ixml_parser,
l_istream TYPE REF TO if_ixml_istream,
l_document TYPE REF TO if_ixml_document,
l_node TYPE REF TO if_ixml_node,
l_xmldata TYPE string.
DATA: l_elem TYPE REF TO if_ixml_element,
l_root_node TYPE REF TO if_ixml_node,
l_next_node TYPE REF TO if_ixml_node,
l_name TYPE string,
l_iterator TYPE REF TO if_ixml_node_iterator.
DATA: l_xml_table TYPE TABLE OF t_xml_line,
l_xml_line TYPE t_xml_line,
l_xml_table_size TYPE i.
DATA: l_filename TYPE string.
DATA : gv_projectdetails TYPE string .
DATA : xref TYPE REF TO cx_dynamic_check .
PERFORM get_complete_path USING p_path2 p_file2 CHANGING gv_complete_path .
Creating the main iXML factory
l_ixml = cl_ixml=>create( ).
Creating a stream factory
l_streamfactory = l_ixml->create_stream_factory( ).
PERFORM get_xml_table CHANGING l_xml_table_size l_xml_table.
wrap the table containing the file into a stream
l_istream = l_streamfactory->create_istream_itable( table = l_xml_table
size = l_xml_table_size ).
Creating a document
l_document = l_ixml->create_document( ).
Create a Parser
l_parser = l_ixml->create_parser( stream_factory = l_streamfactory
istream = l_istream
document = l_document ).
Validate a document
IF pa_val EQ 'X'.
l_parser->set_validating( mode = if_ixml_parser=>co_validate ).
ENDIF.
Parse the stream
IF l_parser->parse( ) NE 0.
IF l_parser->num_errors( ) NE 0.
DATA: parseerror TYPE REF TO if_ixml_parse_error,
str TYPE string,
i TYPE i,
count TYPE i,
index TYPE i.
count = l_parser->num_errors( ).
WRITE: count, ' parse errors have occured:'.
index = 0.
WHILE index < count.
parseerror = l_parser->get_error( index = index ).
i = parseerror->get_line( ).
WRITE: 'line: ', i.
i = parseerror->get_column( ).
WRITE: 'column: ', i.
str = parseerror->get_reason( ).
WRITE: str.
index = index + 1.
ENDWHILE.
SKIP 2.
WRITE : 'The input xml ' , p_file , ' is invalid and does not conform to the inset DTD. '.
EXIT.
ENDIF.
Process the document if there are no errors
ELSEIF l_parser->is_dom_generating( ) EQ 'X'.
PERFORM process_dom USING l_document.
ENDIF.
*& Form get_xml_table
FORM get_xml_table CHANGING l_xml_table_size TYPE i
l_xml_table TYPE STANDARD TABLE.
Local variable declaration
DATA: l_len TYPE i,
l_len2 TYPE i,
l_tab TYPE tsfixml,
l_content TYPE string,
l_str1 TYPE string,
c_conv TYPE REF TO cl_abap_conv_in_ce,
l_itab TYPE TABLE OF string.
l_filename = p_file.
upload a file from the client's workstation
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = l_filename
filetype = 'BIN'
IMPORTING
filelength = l_xml_table_size
CHANGING
data_tab = l_xml_table
EXCEPTIONS
OTHERS = 19.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. "get_xml_table
*& Form process_dom
FORM process_dom USING document TYPE REF TO if_ixml_document.
DATA: node TYPE REF TO if_ixml_node,
iterator TYPE REF TO if_ixml_node_iterator,
nodemap TYPE REF TO if_ixml_named_node_map,
attr TYPE REF TO if_ixml_node,
name TYPE string,
prefix TYPE string,
value TYPE string,
indent TYPE i,
count TYPE i,
index TYPE i.
node ?= document.
CHECK NOT node IS INITIAL.
ULINE.
IF node IS INITIAL. EXIT. ENDIF.
create a node iterator
iterator = node->create_iterator( ).
get current node
node = iterator->get_next( ).
loop over all nodes
WHILE NOT node IS INITIAL.
indent = node->get_height( ) * 2.
indent = indent + 20.
CASE node->get_type( ).
WHEN if_ixml_node=>co_node_element.
element node
name = node->get_name( ).
nodemap = node->get_attributes( ).
gw_elem_value-element = name.
IF NOT nodemap IS INITIAL.
attributes
count = nodemap->get_length( ).
DO count TIMES.
index = sy-index - 1.
attr = nodemap->get_item( index ).
name = attr->get_name( ).
prefix = attr->get_namespace_prefix( ).
value = attr->get_value( ).
ENDDO.
ENDIF.
WHEN if_ixml_node=>co_node_text OR
if_ixml_node=>co_node_cdata_section.
text node
value = node->get_value( ).
TRANSLATE value TO UPPER CASE.
gw_elem_value-value = value.
IF gw_elem_value-element = 'table_name'.
gv_id = gv_id + 1.
ENDIF.
gw_elem_value-recordid = gv_id.
APPEND gw_elem_value TO gi_elem_value.
CLEAR gw_elem_value.
ENDCASE.
advance to next node
node = iterator->get_next( ).
ENDWHILE.
ENDFORM. "process_dom -
Hi, need your help again!
I insert this record:
insert into test(data) values ('"_test_"');
So the "_test_" is stored in test table under data column.
How to insert the data so that the data stored is test instead of "_test_"?
Many many thanks!Well if you don't want the double quotes just remove them.
insert into test(data) values ('_test_');
Maybe you are looking for
-
Setup brand new IPAD 2 ATT wifi +3G. Everything went smooth even setting up the ATT cellular data connect. ATT reconized the purchase however the IPAD will not erconize the 3G function when the wifi is turned off. I have an Iphone 4 and the 3G net
-
Flash 8 Pro freezes on Mac G5, dual 2,5 GHz
Ever since I upgraded from Flash MX 2004 Professional to Flash Professional 8 on my PowerMac G5 it doesn't run. All I can do is open the software but as soon as I click on a menu or a button, whatever, like changing the size it freezes instantly. I'v
-
[SOLVED] Photoshop CS2 stops working with kernel 2.6.27
after upgrade to 2.6.27 my PS CS2 under wine stopped working with the error: I tried to downgrade/upgrade/recompile wine (1.1.6/1.1.5/1.1.7) but no impact I have full copy of my old root partition on hda5 and when I boot to this one PS is working pr
-
Trouble with mobile site. Displays for a second then screen goes black.
Trouble with mobile site. Displays for a second then screen goes black. Using safari, 4s on Verizon. Example: m.mlb.com/lad/
-
How to download the LAN driver for Satellite A100 PSAA8E
Can anyone help how to download the LAN driver for my machine. I found three LAN drivers but unable to download them from the toshiba europe website. Thank you