XML document convert into String and Insert into Database
Hello all,
In the FIle to File Scenario I want to send the data to the Reciever System in xml Document and convert into String and insert into Database.
Please can you tell me exact way how to send it.
Thanks & Regards,
Raj
HI,
As per my understanding your scenario is File to file where you will get output fiel in XML format.
Now that XMl payload need to be passed as single string in the database via XI.
You cauld do this but you need to imply some manipulations such as
With the help of standard API you need to concatenate the XML tags and create the structre along with the data.
For e.g. in your outpuf file the XML structre contain data as
<field1>ABCD</field1>
Then in mapping
The source field will be mappeda s concat(<field1>) + value of Source field "ABCD" + concat(</field1>) to the target field.
This is the way that you could achive the requirments else there is no direct way avaialble for it.
thanks
Swarup
Similar Messages
-
Convert Inputstructure into String and store into DB2
Hello All
My requirement is I want to convert total input structure into string then stored into database single field as clob. Can anyone suggest me how will i retive input structor, is there any user defined function will i write or is there any inbuilt functionality in SAP PI. Plese suggest me
Thanks&Regards,
VenkatKHi Swarup / Shamly
My input structure is nearly 60 fields. Sample Structure
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<create xmlns="urn:MySoapServices">
<PurchaseOrder>
<BuyerDetails>
<Organization>University of Washington</Organization>
<Authorized_Person>
<FisrtName>Cease</FisrtName>
<LastName>Wayne</LastName>
</Authorized_Person>
<Street>Savery Hall</Street>
<City>Seattle</City>
<State>Wa</State>
<Zip>98195</Zip>
<Contact_Numbers>
<Phone>888-846-6638</Phone>
<Fax>212-629-1158</Fax>
</Contact_Numbers>
<Email>hidekiu.washington.edu</Email>
</BuyerDetails>
<SupplierDetails>
<Organization>Thomas Industrial Network</Organization>
<Authorized_Person>
<FisrtName>Cease</FisrtName>
<LastName>Wayne</LastName>
</Authorized_Person>
<Street>5 Penn Plaza, 10th Floor</Street>
<City>New York</City>
<State>NY</State>
<Zip> 10001</Zip>
<Contact_Numbers>
<Phone>888-846-6638</Phone>
<Fax>212-629-1158</Fax>
</Contact_Numbers>
</SupplierDetails>
<PurchaseOrderInformation>
<Order_Number>4556</Order_Number>
<Order_Delivery_Date>10-10-2006</Order_Delivery_Date>
<PO_Type>Finished</PO_Type>
<status>PO sent</status>
</PurchaseOrderInformation>
<Address>
<Shipping_Address>
<Organisation>University of Washington</Organisation>
<Authorized_Person>
<FisrtName>Cease</FisrtName>
<LastName>Wayne</LastName>
</Authorized_Person>
<Street>Savery Hall</Street>
<City>Seattle</City>
<State>Wa</State>
<Zip>98195</Zip>
<Email>hidekiu.washington.edu</Email>
</Shipping_Address>
<Billing_Address>
<Organisation>University of Washington</Organisation>
<Authorized_Person>
<FisrtName>Cease</FisrtName>
<LastName>Wayne</LastName>
</Authorized_Person>
<Street>Savery Hall</Street>
<City>Seattle</City>
<State>Wa</State>
<Zip>98195</Zip>
<Email>hideki</Email>
</Billing_Address>
</Address>
<Payment_Terms>
<Purchase_Order>
<PO_Number>456</PO_Number>
<Payment_Type>Bank</Payment_Type>
<Payment_Type_PO>
<Bank>
<BankName>Citibank</BankName>
<AccountNumber>654987456</AccountNumber>
<BranchCode>564</BranchCode>
</Bank>
<Credit_Card>
<Payment_Type_CC>VISA</Payment_Type_CC>
<CC_Number>1234 4567 7890 0123</CC_Number>
<CC_Expire_Date>10-12-2012</CC_Expire_Date>
</Credit_Card>
</Payment_Type_PO>
</Purchase_Order>
<Currency>USD</Currency>
</Payment_Terms>
<Purchase_Items>
<Item>
<Part_Name>6 foot wide 5 foot high cabinet</Part_Name>
<Quantity>9</Quantity>
<Description>Cabinets of systems</Description>
</Item>
<Item>
<Part_Name>6 foot wide shelves</Part_Name>
<Quantity>6</Quantity>
<Description>Shelves for books</Description>
</Item>
</Purchase_Items>
</PurchaseOrder>
</create>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
I need to store whole XML structure (Including XML version) into Database single field as a clob. not field values. Please help me out from this issue. -
How to parse a delimited string and insert into different columns?
Hi Experts,
I need to parse a delimited string ':level1_value:level2_value:level3_value:...' to 'level1_value', 'level2_value', etc., and insert them into different columns of one table as one row:
Table_Level (Level1, Level2, Level3, ...)
I know I can use substr and instr to get level value one by one and insert into Table, but I'm wondering if there's better ways to do it?
Thanks!user9954260 wrote:
However, there is one tiny problem - the delimiter from the source system is a '|' When I replace your test query with | as delimiter instead of the : it fails. Interestingly, if I use ; it works. See below:
with t as (
select 'str1|str2|str3||str5|str6' x from dual union all
select '|str2|str3|str4|str5|str6' from dual union all
select 'str1|str2|str3|str4|str5|' from dual union all
select 'str1|str2|||str5|str6' from dual)
select x,
regexp_replace(x,'^([^|]*).*$','\1') y1,
regexp_replace(x,'^[^|]*|([^|]*).*$','\1') y2,
regexp_replace(x,'^([^|]*|){2}([^|]*).*$','\2') y3,
regexp_replace(x,'^([^|]*|){3}([^|]*).*$','\2') y4,
regexp_replace(x,'^([^|]*|){4}([^|]*).*$','\2') y5,
regexp_replace(x,'^([^|]*|){5}([^|]*).*$','\2') y6
from t;
The "bar" or "pipe" symbol is a special character, also called a metacharacter.
If you want to use it as a literal in a regular expression, you will need to escape it with a backslash character (\).
Here's the solution -
test@ORA11G>
test@ORA11G> --
test@ORA11G> with t as (
2 select 'str1|str2|str3||str5|str6' x from dual union all
3 select '|str2|str3|str4|str5|str6' from dual union all
4 select 'str1|str2|str3|str4|str5|' from dual union all
5 select 'str1|str2|||str5|str6' from dual)
6 --
7 select x,
8 regexp_replace(x,'^([^|]*).*$','\1') y1,
9 regexp_replace(x,'^[^|]*\|([^|]*).*$','\1') y2,
10 regexp_replace(x,'^([^|]*\|){2}([^|]*).*$','\2') y3,
11 regexp_replace(x,'^([^|]*\|){3}([^|]*).*$','\2') y4,
12 regexp_replace(x,'^([^|]*\|){4}([^|]*).*$','\2') y5,
13 regexp_replace(x,'^([^|]*\|){5}([^|]*).*$','\2') y6
14 from t;
X Y1 Y2 Y3 Y4 Y5 Y6
str1|str2|str3||str5|str6 str1 str2 str3 str5 str6
|str2|str3|str4|str5|str6 str2 str3 str4 str5 str6
str1|str2|str3|str4|str5| str1 str2 str3 str4 str5
str1|str2|||str5|str6 str1 str2 str5 str6
4 rows selected.
test@ORA11G>
test@ORA11G>isotope
PS - it works for semi-colon character ";" because it is not a metacharacter. So its literal value is considered by the regex engine for matching.
Edited by: isotope on Feb 26, 2010 11:09 AM -
Converting to PDF and Inserting into another PDF?
Is there a way to convert a file to PDF and then insert that file into another pdf using JavaScript?
Thanks,
ToddHi Paul,
Thanks for the response, this is actually an adobe form that has been saved as an adobe dynamic XML pdf. Is there a way to do this in a form via code?
What I would like to do is attach a supporting document to the form and Print both the form and the supporting document with a simple click, is this possible?
Any help or a point in the right direction would be appreciated.
Thanks,
Todd -
Extract data from xml file and insert into another exiting xml fil
hello,
i am searching extract data from xml file and insert into another exiting xml file by a java program. I understood it is easy to extract data from a xml file, and how ever without creating another xml file. We want to insert the extracted data into another exiting xml file. Suggestions?
Regards,
ZhuozhiIf the files are small, you can load the target file in a DOM document, insert the data from the source file and persist the DOM.
If the files are large, you probably want to use a StAX or SAX. -
How to extract data from xml and insert into Oracle table
Hi,
I have a large xml file. which will have hundreds of the following transaction tags having column names and there values.
There is a table one of the schema with coulums "actualCostRate","billRate"....etc.
I need to extract the values of these columns and insert into the table
<Transaction actualCostRate="0" billRate="0" chargeable="1" clientID="NikuUK" chargeCode="LCOCD1" externalID="L-RESCODE_UK1-PROJ_UK_CNT_GBP-37289-8" importStatus="N" projectID="TESTPROJ" resourceID="admin" transactionDate="2002-02-12" transactionType="L" units="11" taskID="5017601" inputTypeCode="SALES" groupId="123" voucherNumber="ABCVDD" transactionClass="ABCD"/>
<Transaction actualCostRate="0" billRate="0" chargeable="1" clientID="NikuEU" chargeCode="LCOCD1" externalID="L-RESCODE_US1-PROJ_EU_STD2-37291-4" importStatus="N" projectID="TESTPROJ" resourceID="admin" transactionDate="2002-02-04" transactionType="L" units="4" taskID="5017601" inputTypeCode="SALES" groupId="124" voucherNumber="EEE222" transactionClass="DEFG"/>Re: Insert from XML to relational table
http://www.google.ae/search?hl=ar&q=extract+data+from+xml+and+insert+into+Oracle+table+&btnG=%D8%A8%D8%AD%D8%AB+Google&meta= -
How to read the data from XML file and insert into oracle DB
Hi All,
I have below require ment.
I will receive data in the XML file. then i need to read that data and insert into oracle tables. please let me know how this can be handled.
Many Thanks.Sounds a lot like this question, only with less details.
how to read data from XML variable and insert into table variable
We can only help if you provide us details to help as we cannot see what you are doing and only know what you tell us. Plenty of examples abound on the forums that cover the topics you seek as well. -
Hi, extract data from xml file and insert into another exiting xml file
i am searching code to extract data from xml file and insert into another exiting xml file by a java program. I understood it is easy to extract data from a xml file, and how ever without creating another xml file. We want to insert the extracted data into another exiting xml file. Suggestions?
1st xml file which has two lines(text1.xml)
<?xml version="1.0" encoding="iso-8859-1"?>
<xs:PrintDataRequest xmlns:xs="http://com.unisys.com/Anid"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://com.unisys.com/Anid file:ANIDWS.xsd">
<xs:Person>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://com.unisys.com/Anid file:ANIDWS.xsd">
These two lines has to be inserted in the existing another xml(text 2.xml) file(at line 3 and 4)
Regards,
bubblyJadz_Core wrote:
RandomAccessFile? If you know where you want to insert it.Are you sure about this? If using this, the receiving file would have to have bytes inserted that exactly match the number of bytes replaced. I'm thinking that you'll likely have to stream through the second XML with a SAX parser and copy information (or insert new information) as you stream with an XML writer of some sort. -
I have two image file in bmp file format. How to convert them into string and to check if they are differnt or same. If different how to mention or find that where the difference exists. This idea have to be extented with video application as well.
Hi,
if you have vision, you could use the functin IMAQ Image to Array to have a 2D array of the pixel values.
You can then compare pixel by pixel; if your images come from a camera, I would recommend to set a treshold of acceptance.
This is a time consuming solution anyway.
Alternative methods:
1) Make a subtraction of the two images, the resulting image will be the difference of them
2 ) Use IMAQ LogDiff function (operators palette)
3) Calculate the histogram of both image and compare the histogram reports
Good luck,
Alberto -
How to Break this String and put into a Table
Hi all,
Currently i working on the Reading of Csv file.THe Csv file wil be stored as BLOB in one table.
The Format of the Csv file is
EMPCODE :DATEOFBIRTH
312089 ,12/01/1984
321456 ,03/05/1980
120212 ,04/08/1987
312456 ,23/12/1977
311110 ,12/04/1998
323232 ,20/06/1990
UPLOAD_BLOB
column Datatype
UploadId Number
File_details BLOB
And i reading the BLOB in one procedure and i m getting the String as like this ---->
"312089 ,12/01/1984
321456 ,03/05/1980
120212 ,04/08/1987
312456 ,23/12/1977
311110 ,12/04/1998
323232 ,20/06/1990"
I am Dont know how to Parse this String and put in table
While 1<STRING.LENGTH
LOOP
EMPCODE=SUBSTRING();
DATEOFBIRTH=SUBSTRING();
INSERT INTO TABLE VALID_EMPCODE(EMPCODE,DATEOFBIRTH)VALUES(......);END LOOP
VALID_EMPCODE
EMPCODE VARCHAR2(30)
DATEOFBIRTH VARCHAR2(15)
Can any one tell me how to parse this whole string and break themDuplicate post
How to Break this String and put into a Table -
Converting a string of numbers into an array of booleans
For a homework assignment, I need to convert a string of numbers into an array of booleans. The string is a bunch of random numbers (0-9) in sequence, with no spaces. It looks something like this: 0123452348949230740329817438120947392147809231419. I need to make it so that each even number represents a "True" boolean and so that each odd number represents a "False" boolean. I think that I first need to convert each element of the string into a number, and then use a case structure (or something) to say, for each element of the array, "If even, then true. If odd, then false," but I could be wrong. Any suggestions?
billko wrote:
Hooovahh wrote:
billko wrote:
Sounds reasonable. Think about the definition of "odd" and "even" and it will make life a lot easier.
I know you are trying to be vague but I'd like to give a key hint. Use the Quotient and Remainder function.
LOL maybe that was one of the objectives of the homework.
To be fair it sounds like there is more work that is needed. A new user of LabVIEW will have a hard time figuring out how to process each character one at a time when it isn't in an array.
It's just that most people (me at least) stopped thinking about division with quotient and remainder after basic algebra. I then of course changed my way of thinking when I used LabVIEW. Still most of the time when you use division you want to know the fractional part as a decimal. Thinking this way makes the problem more difficult then it needs to be.
Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously. -
Split data and insert into different rows
I have a string like 'sfdsf,sfdsf,sfsd,qweqeqw,iuoi,"
I have created a single column table
I have to extract data from first untill comma(,) occurs and insert into the table like the following
sfdsdf
sfdsf
sfsd
qweqeqw
iuoi
Please help me how to do itOr a Single SQL query
SELECT trim(',' from DECODE(ROWNUM,1,SUBSTR(STR,1,INSTR(STR,',',1)),
LENGTH(STR)-LENGTH(REPLACE(STR,','))+1,SUBSTR(STR,INSTR(STR,',',-1,1)),
SUBSTR(STR,INSTR(STR,',',1,ROWNUM-1), INSTR(STR,',',1,ROWNUM)-INSTR(STR,',',1,ROWNUM-1))
)) STR1
FROM (SELECT 'sfdsf,sfdsf,sfsd,qweqeqw,iuoi' STR FROM DUAL),ALL_TABLES
WHERE ROWNUM <= LENGTH(STR)-LENGTH(REPLACE(STR,','))+1
ORDER BY ROWNUM -
Reading special characters from a flat file and inserting into DB
I'm reading data with special characters like . etc from a flat file , assigning the data to variable in my anonymous block and inserting into my DB. But the show up as inverted ? s. Any clues about how to do this?
If i try to do the insert directly it works. It seems like the error occurs when reading this data into a variable
thanks for the help
Lalit Bhatialalit, this is probably an character set problem, the default on Database creation tends to be 7bit Ascii which does not support special characters, it's been a while since I set up a db in this way, but you need to change settings in oracle.ini. The db will need to be restarted for this. Also, to check current settings try:
select * from NLS_DATABASE_PARAMETERS
You want an 8bit, unicode or multibyte character set. Sorry I cannot remember moer off the top of my head, try searching on NLS or character set -
SQL Loader and Insert Into Performance Difference
Hello All,
Im in a situation to measure performance difference between SQL Loader and Insert into. Say there 10000 records in a flat file and I want to load it into a staging table.
I know that if I use PL/SQL UTL_FILE to do this job performance will degrade(dont ask me why im going for UTL_FILE instead of SQL Loader). But I dont know how much. Can anybody tell me the performance difference in % (like 20% will decrease) in case of 10000 records.
Thanks,
Kannan.Kannan B wrote:
Do not confuse the topic, as I told im not going to use External tables. This post is to speak the performance difference between SQL Loader and Simple Insert Statement.I don't think people are confusing the topic.
External tables are a superior means of reading a file as it doesn't require any command line calls or external control files to be set up. All that is needed is a single external table definition created in a similar way to creating any other table (just with the additional external table information obviously). It also eliminates the need to have a 'staging' table on the database to load the data into as the data can just be queried as needed directly from the file, and if the file changes, so does the data seen through the external table automatically without the need to re-run any SQL*Loader process again.
Who told you not to use External Tables? Do they know what they are talking about? Can they give a valid reason why external tables are not to be used?
IMO, if you're considering SQL*Loader, you should be considering External tables as a better alternative. -
How to Select from Oracle 8i database and insert into Sql Server 2005 datab
Hi how to Select from Oracle 8i and insert into Sql Server 2005.
Source db as Oracle 8i
Target db as Sql Server 2005.
I need to select one table data from Oracle 8i & insert into Sql Server 2005
ThanksThanks Khan..
Is there is any query (OPENQUERY) available for that?
Regards..
Maybe you are looking for
-
Mozilla Firefox and displaying PDFs with Adobe Acrobat NPAPI Plugin
Hello Everyone, I have a strange issue going on in my enviroment with OS X clients, here are the relevent details and that steps I've performed. Clients are on fully patched 10.8.4 machines running Firefox 23.0 and Adobe Reader 11.0.03, the Adobe Acr
-
Oracle Database Inserts Via Microsoft Data Transformation Services (DTS)
This question involves a SQL Server database and an Oracle database. The databases reside on different servers. One of our developers periodically uses Microsoft DTS (Data Transformation Services) to read data from a SQL Server database and insert it
-
Asset reports- diff. results with certain restrictions
Hi experts, I have problem with asset reports (RABEST_ALV01, RAHAFA_ALV01) . When I choose company code, choose sort variant 07 (company code/ asset class),report date 31st of december 2008, depr. area 01, acquisition value lower than 995 EUR and cho
-
When I turn on my Photosmart 7350 it displays "starting up" for a second, then it displays "Assert Error C0140701" and the print button flashes. What could be wrong?
-
Connect USB CF Reader to iPad Camera Kit?
Could someone give this a try and let us know how it works out? I shoot with a Canon DSLR, which is dreadfully slow to transfer when directly connected. Would love to just use a speedy card reader connected to the USB dongle instead. Any feedback is