Change XML declaration from single quote to double quote
Hi all,
i have the following problem in my File Receiver Adapter. My XML File has the declaration <?xml version='1.0' encoding='utf-8'?> (With single quotes ') and want to change it to <?xml version="1.0" encoding="utf-8" ?> (With double quotes ")
I use the XMLAnonymizerBean but this does not change the XML declaration.
Any ideas how to change the declaration
Thanks Max
Hi Suraj,
on the Modul Tab i have the following:
1 | AF_Modules/XMLAnonymizerBean | Local Enterprise Bean | Anonymizer
2 | CallSapAdapter | Local Enterprise Bean | 0
Anonymizer | anonymizer.acceptNamespaces | http://Post.AG/PartnerInterface/Schemas/PVSdeAt/Aviso_V1.0 ns0 http://PostAG.PartnerInterface.Schemas.PVS_deAt.AvisoHeader ns1 http://PostAG.PartnerInterface.Schemas.PVS_deAt.AvisoShipper ns2
Anonymizer | anonymizer.quote | "
That is all what i have on the module tab.
I send the data as Text (not Binär). Thats all what i have in the adapter. Do you need any further information?
Regards, Max
Similar Messages
-
How to replace single quote with double quote
hai all,
i have a problem,
i am trying insert a string containing single quote into ms-access database.
it is giving error.
how can i avoid this .if i replace a single quote in the text with double quote it will defenitely
insert into database.
in java.lang.String
replace () will not work to replace quote with double quote.
any otherway to solve this problem.
please mail me to [email protected]
thank you
sambareddy
inidajava.lang.String.replace () will not work to replace quote with double quote.Really?
String x = ...
x.replace( "'", "\"" ); -
Changing controlling area from single company code to cross company code
Hi,
Due to my client requirement, in the middle of the year, we need to change the controlling area from being same as company code to cross company code controlling area. Although the currency is same. We are going to create a new company code. Is the changing controlling area settings possible to do? what are the precautions and changes need to be taken?
One more question, we need to change the company code when the new company code is created in the system in Cost Center Masters in the middle of the year. Is this possible after changing controlling area from single company code to cross company code. Right now company code is not appearing in the cost center master.
Thanks & Regards,
SaidaraoHi,
If both companies having transaction data its not possible,Normally before defining Organisational Strucutre only we have to deside both companies is assigning same controlling are or have to maitain separately for this we have to compare the Fiscal year,Operating chart of accounts ,if both having same then we will assign both the company codes to one controlling area if these two companies having different currencies also its not a problem.When we creating Controlling Area we have to choose option of controlling area as same company code (if one company code one controlling Area) for example if you assigning two companies then we have to use cross company code cost accounting.If u need any further information let me know.
Regards,
Satya -
How to exclude the XML declaration from each row of the result set?
Hi,
I have a table with an XMLTYPE column and would like to SELECT a set of rows. How can I exclude the XML declaration from each row in the result set? My query currently looks like this, I'm executing it through Spring JDBC:
SELECT XMLSerialize(CONTENT t1.xmltext) FROM myschema.event t1 WHERE XMLEXISTS('$e/Event' PASSING XMLTEXT AS "e") ORDER BY t1.time DESC
After selecting, in my application I convert each row into a String and concatenate all rows into one big string in order to parse it into a DOM model. I get a parser exception (org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed) because there are multiple XML declarations in my big string. Of course, I could manually check the String of each row whether it starts with the XML declaration, but it would be nicer if I could instruct the DB not to add it in the first place. Is there a way?
Thanks!
-- DanielaHi,
A couple of options I can think of :
SELECT XMLSerialize(CONTENT
XMLtransform(t1.xmltext,
xmltype('<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output omit-xml-declaration="yes"/>
<xsl:template match="/"><xsl:copy-of select="*"/></xsl:template>
</xsl:stylesheet>')
FROM myschema.event t1
WHERE XMLEXISTS('$e/Event' PASSING XMLTEXT AS "e")
ORDER BY t1.time DESC
;or simply,
SELECT XMLSerialize(CONTENT
extract(t1.xmltext,'/')
FROM myschema.event t1
WHERE XMLEXISTS('$e/Event' PASSING XMLTEXT AS "e")
ORDER BY t1.time DESC
; -
What 's the difference between quote ' and double quote "?
what's the difference between quote' and double quote "?
when we use each one?
Exemple of use of each case?'c' is a char, ie. a primitive type representing a single character
"c" is an instance of the String class length 1. -
String value changes single quote ' to double quote "
I am creating a list with different bill codes within single
quotes as follows
<cfset corlist = " '1100 ','1200 ','1300 ','1700 ','1800
','1950 ','7001 ' ">
when I do an output
for
<cfoutput>AND idbillcode IN ( #corlist
#)</cfoutput>
I get the values as follows
AND idbillcode IN ( '1100 ','1200 ','1300 ','1700 ','1800
','1950 ','7001 ')
However when I put the same string within a cfquery the
single quotes get replaced by double quotes as follows
AND idbillcode IN ( ''1100 '',''1200 '',''1300 '',''1700
'',''1800 '',''1950 '',''7001 '') which throws an error.
Anybody has any clues.
Thanks.However when I put the same string within a cfquery the
single quotes
get replaced by double quotes as follows
AND idbillcode IN ( ''1100 '',''1200 '',''1300 '',''1700
'',''1800
'',''1950
'',''7001 '') which throws an error.
Anybody has any clues.
That is ColdFusion escaping the single quotes, by doubling
them so that
you can search for strings such as "singhpk's code does not
work".
(Note the single quote/apostrophe that would normally break
this string
if it was not escaped.
To tell CF not to do this, one uses the
preserveSingleQuotes() function.
The documentation has all the details. -
Replace Single Quote with double quote
Hi All,
I have a String s="help'me'to'replace";
i want to replace single quote( ' ) in to double quote ( " )
The final out put should be like this help"me"to"replace
( Actually this string i have to pass in to an XML )
Please help any ones.replaceAll("'","\"");{code}
or just one of the String#replace() methods.
Edited by: sabre150 on Mar 17, 2009 11:48 AM -
ReplaceAll() single quotes to double quotes
i've been trying to use the replaceAll() method to change single
quotes in a document to double quotes. All my attempts have
failed.
Thanks in advance,
EnaknonnelSorry, I was terse in my first post, but since you are just replacing one char
with another, using replaceAll is overkill -- it is meant to take a regular expression
search string. So keep it simple and use replace. I think you may have
chosen replaceAll because of that reassuring "All" in its name, but do check
the API: method replace replaces all occurrences.
One more thing: posting something like "All my attempts have failed" is itself
a failure. It tells us nothing concrete. A better post would have included
a short example program that was your best attempt. -
Is it possible to remove xml declaration from a target HTTP msg in PI 7.1?
Hello,
I am working on a SOAP to HTTP scenario in PI 7.1.
I am using a java mapping to create a target string. This target string does not contain XML declaration(<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>) in it.
To elaborate the issue, while testing the message mapping, this XML declaration is not being prefixed to the message content. But, in integration engine, the http target message is being prefixed by this XML declaration by default.
Output when tested in Operation Mapping(Desired result):
abc=123:def=456
Output been sent to receiver:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> abc=123:def=456
Is there any possibility to send a HTTP message to the receiver without this XML declartion. In other words, I need only the message content to be sent to the receiver.
Kindly suggest.
Regards,
SwethaHi,
You can use JAVA/or XSLT mapping
See this for Code
Remove Encoding UTF from xml declaration in PI -
How to change XML Structure from one form to another form using OO ABAP.
Hi Experts,
In my Scenario, i need to do ABAP Mapping in order to change Incoming structure from one form to another.
My Input to ABAP Mapping (OO ABAP Program)would be :
<A>..........</A>
<B>..........</B>
<C> .........</C>
<D>..........</D>
<E>..........</E>
<F>..........</F>
OO ABAP Program need to read this input and change the XML Structure into below form:
<A>..........</A>
<B>..........</B>
<C> .........</C>
<X>
<D>..........</D>
<E>..........</E>
<F>...............<F>
Please provide inputs (sample Code) to solve this issue.
Thanks,
Kish.
Edited by: Kishore Reddy Thamma on Jan 22, 2008 2:51 PM
Edited by: Kishore Reddy Thamma on Jan 22, 2008 2:52 PMHi,
Please provide sample code or Material for converting XML Structure from one form to another using OO ABAP and
Steps for ABAP MAPPING.
Thanks,
Kish. -
How to change xml declaration using jaxb Marshaller
please, my xml declaration, in the output file generated by jaxb: javax.xml.bind.Marshaller is:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
I need to change it in:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="style.xsl"?>
I don't have idea about how to change.
thanks a lot alessandroHello.
public void saveJaxbObjectToFile(String packageName, Object myJaxbObject, String fileName)
throws JAXBException, ParserConfigurationException, TransformerConfigurationException,
TransformerException, FileNotFoundException, IOException {
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setNamespaceAware(true);
DocumentBuilder db = dbf.newDocumentBuilder();
org.w3c.dom.Document document = db.newDocument();
JAXBContext jAXBContext = JAXBContext.newInstance(packageName);
Marshaller m = jAXBContext.createMarshaller();
m.marshal(myJaxbObject, document);
ProcessingInstruction processingInstruction = document.createProcessingInstruction("xml-stylesheet", "type=\"text/xsl\" href=\"style.xsl\"");
Node rootElement = document.getDocumentElement();
document.insertBefore(processingInstruction, rootElement);
TransformerFactory transformerFactory = TransformerFactory.newInstance();
Transformer transformer = transformerFactory.newTransformer();
transformer = transformerFactory.newTransformer();
transformer.setOutputProperty("indent", "yes");
transformer.setOutputProperty("encoding", "UTF-8");
transformer.setOutputProperty("version", "1.0");
FileOutputStream fos = new FileOutputStream(fileName);
transformer.transform(new DOMSource(document), new StreamResult(fos));
fos.flush();
fos.close();
Good luck. -
SQL Loader: double quotes inside double quotes
Hello,
I need to find a solution for loading some data that contains double quotas. The csv contains data like:
"1";"Name1";"Name2"
"2";"Name3 "another thing here"";"Name4"
"3";"Name33 "thing here"";"Name "name" Name"
The data inside the " " must be loaded exactly as it is, that means that in the DB, for row2, column2 the data must be: Name3 "another thing here". I cannot remove the qoutes.
the CTL:
LOAD DATA
CHARACTERSET AL32UTF8
INTO table table_name
APPEND
FIELDS TERMINATED BY ';' OPTIONALLY ENCLOSED BY '\"'
TRAILING NULLCOLS
Column1,
Column2,
Column3
Could anyone help on this?try with this ctl
LOAD DATA
CHARACTERSET AL32UTF8
INTO table table_name
APPEND
FIELDS TERMINATED BY ';' ENCLOSED BY '"'
TRAILING NULLCOLS
Column1,
Column2,
Column3
)also refer to
here and here
for detailed explanations and instructions -
PL/SQL: quoting problems (double quotes within PL/SQL, howto?)
Hello,
I have a big problem with that: I just cannot use execute immediate to do what I want.
The goal is that another user than sysdba needs to be able to open/close the wallet (we are sysdba and our client doesn't want us to be able to open the wallet, and we don't want the client to have sysdba), so I take advantage of the fact that procedures are executed by default with the privileges of the user which writes it. So, I try and create a PL/SQL procedure as sys and grant execute rights to the client user.
To open/close a wallet, the command is:
alter system set encryption wallet open/close identified by "thepasshere";
Note the double quotes... They are the problem here (passwords are mixed case and contain special characters). Right now, the only solution I came up with is:
create or replace procedure open_wallet (passwd in varchar2) is
begin
execute immediate 'alter system set encryption wallet open identified by "' || passwd || '";';
end;
But that's vulnerable to code injection... So, instead, I tried:
create or replace procedure open_wallet (passwd in varchar2) is
cmd varchar2(512);
begin
cmd != 'alter system set encryption wallet open identified by ":1"';
execute immediate cmd using passwd;
end;
which yields "ORA-00911: invalid character" - uh?
Now, if I try:
create or replace procedure open_wallet (passwd in varchar2) is
cmd varchar(512);
begin
cmd := 'alter system set encryption wallet open identified by :1;';
execute immediate cmd using passwd;
end;
it answers "ORA-28357: password required to open the wallet"
Aaargh! I see no way around that :(
Is there a solution at all?Did you try including the double quotes in the password bind value? Either when you pass the value in or by adding it in the routine.
create or replace procedure open_wallet (passwd in varchar2) is
cmd varchar(512);
pass varchar(512);
begin
cmd := 'alter system set encryption wallet open identified by :1;';
pass := '"' || passwd || '"';
execute immediate cmd using pass;
end; -
How do change boot disk from single user mode?
My G5 hangs when booting at the blue screen while "Loading printing services...". Attempting to boot into safe mode only hangs at the grey gear screen. It will, however, successfully boot into single user mode. I've run fsck but no change in bootability. I have another disk in the machine that has Tiger on it. How do I change the boot disk from the single user prompt?
You can hold c and boot off the installer disk and select disk utility repair disk/permissions
or you can hold option to boot off Mac OS X on another drive, like a clone and run Data Rescue to recvoer your files.
It does sound bad, you can try going through these
http://docs.info.apple.com/article.html?artnum=106464
But I think you'll need a fresh install, hopefully you have been backing up/cloning to a external drive.
http://homepage.mac.com/hogfish/Personal11.html -
How to parse multiple xml documents from single buffer
Hello,
I am trying to use jaxb 2.0 to parse a buffer which contains multiple xml documents. However, it seems that it is meant to only parse a single document at a time and throws an exception when it gets to the 2nd document.
Is there a way I can tell jaxb to only parse the first complete document and not fetch the next one out of the buffer? Or what is the most efficient way to separate the buffer into two documents without parsing it manually. If I have to search the buffer for the next document root and then split the buffer, it seems like that defeats the purpose of using jaxb as the parser.
I am using the Unmarshaller.unmarshall method and the exception I am getting is:
org.xml.sax.SAXParseException: Illegal character at end of document, <.]
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException(AbstractUnmarshallerImpl.java:315)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.createUnmarshalException(UnmarshallerImpl.java:476)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:198)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:167)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:137)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:184)
Thank you for your helpIt's just like any other XML parser, it's only designed to parse one XML document. If you have something that concatenates two XML documents together (that's what your "buffer" sounds like), then stop doing that.
Maybe you are looking for
-
Installing Windows 8.1 on a Dell Inspiron 3451 with SSD (Crucial BX100 256GB)
Hey, I have a problem with the clean installation of Windows 8.1 on a Dell Inspiron 3451 laptop with SSD (256GB Crucial BX100). The problem is that the installer does not see the disk, prompts you to install the driver. Secure boot disabled. The dis
-
Hi everybody, OS: Windows XP SP2 Forms: 10.1.2.0.2 Browser: FireFox 2.0.0.5 I have in my form (100 text items) and the following code: DECLARE i NUMBER := 0; BEGIN FOR i IN 1 .. 100 LOOP SET_ITEM_PROPERTY( 'txt_segment_' || i , VISIBLE , PROPERTY_FAL
-
Need help installing PS CS4 on new Windows 7 laptop
The laptop I had crashed and I bought a new one. Windows 7. Trying to reinstall Photoshop CS4 onto it, but getting error message, "The installer database is corrupt. Contact customer support." I contacted customer support and was told they no long
-
I have just installed iPhoto 11 and all of photos on my iphone have now all disappeared and ended up in my photo stream and the library in iphoto does not display all my pictures?? Can anyone help?
-
Hy, I am from Europe, and I'm planning to buy a MacBook Pro from the states maybe next month. I saw at the tech specs that the package contains a 100-240V AC adaptor. I'm not sure how this really works...I mean, does the package contain a charger for