How to update html file in clob column in oracle
hi,
please help me how to update html file in clob column in oracle
Thanks
This is your main query as i am able to understand and you want to update your html file into terms columns based on conditions :
SELECT b.terms As terms
FROM chklst_item_x_enrlmnt_type a, prvdr_enrlmnt_agreement b
WHERE a.enrlmnt_type_cid = 1
AND a.chklst_item_cid = b.chklst_item_cid
AND a.chklst_item_cid = 79
AND a.oprtnl_flag = 'A'
AND b.oprtnl_flag = 'A'
AND TRUNC (SYSDATE) BETWEEN b.from_date AND b.TO_DATE;So i suggest below one but you need to create a directory where you can store your html file and then you can update .. And remaining consult Experts suggestions too as your
question is improperly posted . . .
DECLARE
vclob CLOB;
v_bfile BFILE := BFILENAME ('YOUR_DIR', 'filename.html');
BEGIN
SELECT b.terms
INTO vclob
FROM chklst_item_x_enrlmnt_type a, prvdr_enrlmnt_agreement b
WHERE a.enrlmnt_type_cid = 1
AND a.chklst_item_cid = b.chklst_item_cid
AND a.chklst_item_cid = 79
AND a.oprtnl_flag = 'A'
AND b.oprtnl_flag = 'A'
AND TRUNC (SYSDATE) BETWEEN b.from_date AND b.TO_DATE
FOR UPDATE;
DBMS_LOB.fileopen (v_bfile);
DBMS_LOB.loadfromfile (vclob, v_bfile, DBMS_LOB.getlength (v_bfile));
DBMS_LOB.fileclose (v_bfile);
END;
/ Regards..
Similar Messages
-
How to read .html file and store values into oracle table from html file
Hi all ,
How to read .html file and store values into oracle table from html file using pl/sql
Please Help.....Hi,
Kindly find following sample html code ,i want to store every value in different column in database .
<html><body><p/>
<div style="position:absolute;top:47px;left:37px;font-family:'Times New Roman';font-size:10pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:47px;left:680px;font-family:'Times New Roman';font-size:10pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:94px;left:151px;font-family:'Times New Roman';font-size:1pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:1080px;left:115px;font-family:'Times New Roman';font-size:8pt;white-space:nowrap;">4497743
</div>
<div style="position:absolute;top:1079px;left:442px;font-family:'Times New Roman';font-size:9pt;white-space:nowrap;"> Miclyn Express Offshore Pre-Quotation Disclosure
</div>
<div style="position:absolute;top:1079px;left:680px;font-family:'Times New Roman';font-size:9pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:1079px;left:723px;font-family:'Times New Roman';font-size:9pt;white-space:nowrap;">page 5
</div>
<div style="position:absolute;top:1083px;left:151px;font-family:'Times New Roman';font-size:1pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:107px;left:151px;font-family:'Times New Roman';font-size:10pt;white-space:nowrap;"><b>Attachment 2 ¿ indicative statement of 20 largest shareholders </b>
</div>
<div style="position:absolute;top:139px;left:262px;font-family:'Times New Roman';font-size:10pt;white-space:nowrap;"><b>Name </b>
</div>
<div style="position:absolute;top:131px;left:415px;font-family:'Times New Roman';font-size:10pt;white-space:nowrap;"><b>Number of Shares </b>
</div>
<div style="position:absolute;top:147px;left:458px;font-family:'Times New Roman';font-size:10pt;white-space:nowrap;"><b>Held </b>
</div>
<div style="position:absolute;top:131px;left:560px;font-family:'Times New Roman';font-size:10pt;white-space:nowrap;"><b>Percentage of </b>
</div>
<div style="position:absolute;top:147px;left:567px;font-family:'Times New Roman';font-size:10pt;white-space:nowrap;"><b>shares held </b>
</div>
<div style="position:absolute;top:179px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Macquarie Capital Group Limited 92,378,000
</div>
<div style="position:absolute;top:179px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:179px;left:618px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">34.00%r
</div>
<div style="position:absolute;top:179px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:212px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">HSBC Custody Nominees (Australia)
</div>
<div style="position:absolute;top:227px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Limited
</div>
<div style="position:absolute;top:220px;left:464px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">36,458,220
</div>
<div style="position:absolute;top:220px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:220px;left:618px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">13.42%
</div>
<div style="position:absolute;top:220px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:260px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Ray Rider Limited 27,170,000
</div>
<div style="position:absolute;top:260px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:260px;left:618px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">10.00%
</div>
<div style="position:absolute;top:260px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:300px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:300px;left:625px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">7.96%
</div>
<div style="position:absolute;top:300px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:333px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">National Australia Bank Custodian
</div>
<div style="position:absolute;top:348px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Services
</div>
<div style="position:absolute;top:341px;left:464px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">12,866,550
</div>
<div style="position:absolute;top:341px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:341px;left:625px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">4.74%
</div>
<div style="position:absolute;top:341px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:381px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Citigroup Nominees Pty Ltd 6,942,541
</div>
<div style="position:absolute;top:381px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:381px;left:625px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">2.56%r
</div>
<div style="position:absolute;top:381px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:421px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:421px;left:625px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">2.14%r
</div>
<div style="position:absolute;top:421px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:462px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">UBS Securities Australia Ltd 4,806,760
</div>
<div style="position:absolute;top:462px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:462px;left:625px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">1.77%
</div>
<div style="position:absolute;top:462px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:494px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Merrill Lynch Equities (Australia)
</div>
<div style="position:absolute;top:510px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Limited
</div>
<div style="position:absolute;top:502px;left:472px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">4,325,000
</div>
<div style="position:absolute;top:502px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:502px;left:625px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">1.59%
</div>
<div style="position:absolute;top:502px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:550px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Equities Ltd
</div>
<div style="position:absolute;top:542px;left:472px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">4,150,000
</div>
<div style="position:absolute;top:542px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:542px;left:625px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">1.53%
</div>
<div style="position:absolute;top:542px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:575px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Bond Street Custodians Limited - A/C
</div>
<div style="position:absolute;top:590px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Institutional
</div>
<div style="position:absolute;top:583px;left:472px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">2,750,000
</div>
<div style="position:absolute;top:583px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:583px;left:625px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">1.01%
</div>
<div style="position:absolute;top:583px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:623px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Cogent Investment Operations Pty Ltd 2,599,321
</div>
<div style="position:absolute;top:623px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:623px;left:625px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">0.96%
</div>
<div style="position:absolute;top:623px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:663px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Skeet Nominees Pty Ltd 2,276,736
</div>
<div style="position:absolute;top:663px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:663px;left:625px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">0.84%
</div>
<div style="position:absolute;top:663px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:704px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Diederik de Boer 1,917,561
</div>
<div style="position:absolute;top:704px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:704px;left:625px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">0.71%
</div>
<div style="position:absolute;top:704px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:744px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Ecapital Nominees Pty Limited 1,594,736
</div>
<div style="position:absolute;top:744px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:744px;left:625px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">0.59%
</div>
<div style="position:absolute;top:744px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:777px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Neweconomy Com Au Nominees Pty 9
</div>
<div style="position:absolute;top:792px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Limited <900 Account>
</div>
<div style="position:absolute;top:784px;left:472px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">1,594,7360
</div>
<div style="position:absolute;top:784px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:784px;left:625px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">0.59%
</div>
<div style="position:absolute;top:784px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:825px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Sonray Capital Markets Pty Ltd 1,236,842
</div>
<div style="position:absolute;top:825px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:825px;left:625px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">0.46%
</div>
<div style="position:absolute;top:825px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:865px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Argo Investments Limited 1,050,000
</div>
<div style="position:absolute;top:865px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:865px;left:625px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">0.39%
</div>
<div style="position:absolute;top:865px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:905px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Idameno (No 79) Nominees Pty Limited 724,210</div>
<div style="position:absolute;top:1103px;">
</body></html>
Thanks.......................... -
Fetching a text file into CLOB column in Oracle!
Can anyone please help me to find out how to fetch a text file present on the network on to the CLOB column in Oracle 8i?
I dont want to use BFILE for this.
Please help its urgent.
Love
Prathab
nullPrathab,
This is an example from the SQL package doc for DBMS_LOB, that reads from a bfile, and store in a lob.
CREATE OR REPLACE PROCEDURE Example_l2f IS
lobd BLOB;
fils BFILE := BFILENAME('SOME_DIR_OBJ','some_file');
amt INTEGER := 4000;
BEGIN
SELECT b_lob INTO lobd FROM lob_table WHERE key_value = 42 FOR UPDATE;
dbms_lob.fileopen(fils, dbms_lob.file_readonly);
dbms_lob.loadfromfile(lobd, fils, amt);
COMMIT;
dbms_lob.fileclose(fils);
END;
Hope it helps.
Eric
null -
Error while inserting .doc file into CLOB object in oracle
hello everybody ,
i am trying to insert .doc file into clob column in oracle database.i am using oracle 8i. But i am getting error saying
ORA-01461: can bind a LONG value only for insert into a LONG column
i have no clue.
i am pasting code here
please help me out.
regards
darshan
import java.io.File;
import java.io.FileInputStream;
import java.io.FileReader;
import java.io.Reader;
import java.sql.Connection;
import java.sql.PreparedStatement;
public class InsertingClob {
public static void main(String[] args) {
File f = new File("E:\\dar
sowres.doc");
int len = (int) f.length();
System.out.println(len);
Connection conn = null;
PreparedStatement ps = null;
try {
FileReader fr = new FileReader(f);
String FILE_INSERT_QUERY = "INSERT INTO RESUMED VALUES(?,?)";
conn = JDBCUtility.getConnection();
ps = conn.prepareStatement(FILE_INSERT_QUERY);
ps.setString(1,"1");
ps.setCharacterStream(2,fr,len);
int result = ps.executeUpdate();
if(result ==1) {
System.out.println("file has been successfully inserted into the db");;
}else {
System.out.println("not inserted");
}catch (Exception e) {
e.printStackTrace();
and the error is
java.sql.SQLException: ORA-01461: can bind a LONG value only for insert into a LONG column
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:582)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1986)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1144)
at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2152)
at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2035)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2876)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:609)
at InsertBlob.main(InsertBlob.java:21)
java.sql.SQLException: ORA-01461: can bind a LONG value only for insert into a LONG columnYou may have one of a few errors going for you there:
The error says your column in Oracle is a Long not a CLOB, if it is, then make your column a CLOB.
CLOB's are not suppored in all environments and/or all interfaces (specifically Windoz ODBC has a problem).
I believe a DOC (Windoz MS-Word) file is a BLOB, due to formatting characters in the file.
I had a very similar error using Access and trying to do this, but changing to SAS fixed the problem. It could very well be that your version of ODBC/JDBC drivers does not support it properly. -
How to read/write .CSV file into CLOB column in a table of Oracle 10g
I have a requirement which is nothing but a table has two column
create table emp_data (empid number, report clob)
Here REPORT column is CLOB data type which used to load the data from the .csv file.
The requirement here is
1) How to load data from .CSV file into CLOB column along with empid using DBMS_lob utility
2) How to read report columns which should return all the columns present in the .CSV file (dynamically because every csv file may have different number of columns) along with the primariy key empid).
eg: empid report_field1 report_field2
1 x y
Any help would be appreciated.If I understand you right, you want each row in your table to contain an emp_id and the complete text of a multi-record .csv file.
It's not clear how you relate emp_id to the appropriate file to be read. Is the emp_id stored in the csv file?
To read the file, you can use functions from [UTL_FILE|http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/u_file.htm#BABGGEDF] (as long as the file is in a directory accessible to the Oracle server):
declare
lt_report_clob CLOB;
l_max_line_length integer := 1024; -- set as high as the longest line in your file
l_infile UTL_FILE.file_type;
l_buffer varchar2(1024);
l_emp_id report_table.emp_id%type := 123; -- not clear where emp_id comes from
l_filename varchar2(200) := 'my_file_name.csv'; -- get this from somewhere
begin
-- open the file; we assume an Oracle directory has already been created
l_infile := utl_file.fopen('CSV_DIRECTORY', l_filename, 'r', l_max_line_length);
-- initialise the empty clob
dbms_lob.createtemporary(lt_report_clob, TRUE, DBMS_LOB.session);
loop
begin
utl_file.get_line(l_infile, l_buffer);
dbms_lob.append(lt_report_clob, l_buffer);
exception
when no_data_found then
exit;
end;
end loop;
insert into report_table (emp_id, report)
values (l_emp_id, lt_report_clob);
-- free the temporary lob
dbms_lob.freetemporary(lt_report_clob);
-- close the file
UTL_FILE.fclose(l_infile);
end;This simple line-by-line approach is easy to understand, and gives you an opportunity (if you want) to take each line in the file and transform it (for example, you could transform it into a nested table, or into XML). However it can be rather slow if there are many records in the csv file - the lob_append operation is not particularly efficient. I was able to improve the efficiency by caching the lines in a VARCHAR2 up to a maximum cache size, and only then appending to the LOB - see [three posts on my blog|http://preferisco.blogspot.com/search/label/lob].
There is at least one other possibility:
- you could use [DBMS_LOB.loadclobfromfile|http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_lob.htm#i998978]. I've not tried this before myself, but I think the procedure is described [here in the 9i docs|http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96591/adl12bfl.htm#879711]. This is likely to be faster than UTL_FILE (because it is all happening in the underlying DBMS_LOB package, possibly in a native way).
That's all for now. I haven't yet answered your question on how to report data back out of the CLOB. I would like to know how you associate employees with files; what happens if there is > 1 file per employee, etc.
HTH
Regards Nigel
Edited by: nthomas on Mar 2, 2009 11:22 AM - don't forget to fclose the file... -
How to aviod html tags from Report column heading while export to csv
Hi All,
How to aviod html tags from Report column heading while export to excel.
We used like Employee<br> Department in column heading, but the problem is the <br> tag also exporting into csv file.
If any column data 3/2009 formatt the it will exporting as marh 2009.
Please help on this.
Thanks,
Nr
Edited by: pnr on Jul 5, 2011 5:00 AMHi Nr
Here is how I approached this problem.
Go to report attributes tab
under column attributes check PLSQL radio button.
Create a function to return the heading of your report as shown below in your database.
create function get_heading return clob as
v_request VARCHAR2(20) := V('REQUEST');
v_col_heading CLOB;
begin
IF INSTR(v_request,'FLOW_EXCEL_OUTPUT',1) > 0 THEN
v_col_heading := 'Employee Number:Employee Name';
ELSE
v_col_heading := 'Employee breaktag Number:Employee break tag Name';
END IF;
return v_col_heading;
end;
Type the function below under ( Function returning colon delimited headings:) as follows.
return get_heading;
Similarly for data base it on PLSQL function body returning SQL and follow the same approach as headings.
Hope this helps.
Thanks
Sukarna
Edited by: user513776 on Jul 5, 2011 2:24 PM
Edited by: user513776 on Jul 5, 2011 2:27 PM -
How to read HTML files using UTL_FILE
Hello Friends,
How to read HTML files using UTL_FILE package ? According
to Oracle documentation UTL_FILE can read or write OS Text Files.
Thanx in advance..
AdiHI Hareesh,
i have gone through that blog.
i tried it...but i am getting mapping error no receiver determination fond because there are so many excel files.
my data is available on sharedString.xml but also it is in not same order.
i have no clue how to handle this part form the blog.
"This way our mapping will receive all data from the sheet in an XML format. The only thing that's left is to create an XSD file from the XML file we received in order to be able to use it in the mapping and as our Service Interface and we can proceed with mapping. As you can see from the sheet.xml files all the data is placed with column name and row number so it's not that difficult to map it to an table type format using the Message Mapping only (no java, abap mapping required)." -
HOw to update XML file residing in DAM by component JSP in run-time?
i have made a component which reads xml file residing in DAM.
Content Author can fill some values in dialog of this component, as soon as author provide the values,i have to update these values in XML file and component reloadsby reading the updated xml file.
i am trying to achieve this by making object of XML file and giving it's path., but i ma unable to access the XML file.
Can anyone help me out to how to update XML file by component JSP in run-time?Now the changed data must be exported back into the XML file, meaning that the content of certain elements must be updated. How can this be done with XSLT?
XSLT approach: check these online tutorial
http://www.xml.com/pub/a/2000/08/02/xslt/index.html
http://www.xml.com/pub/a/2000/06/07/transforming/index.html
ABAP approach:
for example you have the xml (original) in a string called say xml_out .
data: l_xml type ref to cl_xml_document ,
node type ref to if_ixml_node .
create object l_xml.
call method l_xml->parse_string
exporting
stream = xml_out.
node = l_xml->find_node(
name = 'IDENTITY'
ROOT = ROOT
l_xml->set_attribute(
name = 'Name'
value = 'Charles'
node = node
(the above example reads the element IDENTITY and sets attribute name/value to the same)
like wise you can add new elements starting from IDENTITY using various methods available in class CL_XML_DOCUMENT
so how do I access the XML file in order to update it?
you have already read this XML into a ABAP variable right?
Sorry couldnt understand your whole process, why do you need to read local XML file?
Raja -
Read text file into clob column
Dear Oracle users and Oracle support,
I have a text file that includes hundreds of data entries. The format is below. What I need to do is read each entry (
<DATALOAD ................</DATALOAD>) into the CLOB column as a table record. Then create a loop in the table to convert each record into XML data type. I have general idea on how to convert CLOB to XML. The difficult part to me is read the each entry in the text file to CLOB table. Please let me know what technique I should use. Any recommendation and sample code are welcome! I appreciate!
Thanks,
Bing
<DATALOAD ................</DATALOAD>
<DATALOAD ................</DATALOAD>
<DATALOAD ................</DATALOAD>
<DATALOAD ................</DATALOAD>RBYL wrote:
Hi,
Thank you for your response. What I want to achieve is read the text file into ClOB column. There are hundreds reocords in the text file. The format is below. Each entry is '<DATALOAD (sensitive data here, use....... instead)</DATALOAD>' that needs to be read into clob table as a record. That is basically what I need to achieve.
<DATALOAD ................</DATALOAD>
<DATALOAD ................</DATALOAD>
hundreds of them here........
<DATALOAD ................</DATALOAD>
<DATALOAD ................</DATALOAD>So, is it really a text file or is it a well structured XML file?
Just reading it into a CLOB to process is not likely to be the best way.
If each line of the file is a record, then you're likely to be better using something like External Tables.
If it's a structured XML file, then it can be read using CLOB functionality into an XMLTYPE datatype and then shredded down into relational table structures.
Be more clear in what your requirements are and we can help you better.
{message:id=9360002} -
How to put html file into a canevas?
How to put html file into a canevas?
Hi,
would require you to write a JavaBean that interprets the HTML (there are commercial versions of this available)
Frank -
How to make html file on server side from the data entered in text area
Hi!
I want to know how to make .html file on server side. Like if i enter the data in text area ( or like we normaly see when we write mail that editor) and we can use html tages in it and when user submit form all the data in that field will be saved on server side as an html formate. Is it possible to do so??? or any ruff idea how to design it???Erm ...
Whats the problem with that?!
Ok, here the code ...
String myparameter = request.getParameter("paramname");
String htmltemplate = "<html>\n"
+"<head><title>demo</title></head>\n";
+"<body>@parametertag@</body>\n";
+"<html>";
String htmlpage = htmltemplate.replaceAll("@parametertag@",myparameter);
File yourHTMLfile = new File("wheredoyouwannagotoday.html");
FileOutputStream fos = new FileOutputStream(yourHTMLfile);
fos.write(htmlpage.getBytes());
fos.close();You're done.
Happy Coding! :-) © -
How to convert html file to master file in sharepoint branding
How to convert HTML file to master file in SharePoint branding Programmatically
Hi,
According to your post, my understanding is that you want to convert HTML file to master file.
You can use Design Manager to achieve it.
On STEP 4 Edit Master Pages and clicked on the option at the top to
Convert an HTML file to a SharePoint master page.
Once completed, make sure the Status is set to Conversion Successful
For more information, please refer to:
SharePoint 2013 – Design Manager – Convert HTML to Master Page
Best Regards,
Linda Li
Linda Li
TechNet Community Support -
Kindly help me how to view html file in swing using jbutton
hello..im a begginer at j2se language and im working on my school project..kindly help me how to view html files by clicking button at javax.swing..thanks
Here you go:public class HTMLViewer implements Runnable, ActionListener
public void run() {
JFrame frame = new JFrame("View HTML");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JButton button = new JButton("Click me!");
button.addActionListener(this);
Container cp = frame.getContentPane();
cp.add(button, BorderLayout.CENTER);
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
public void actionPerformed(ActionEvent e) {
if (Desktop.isDesktopSupported()) {
Desktop d = Desktop.getDesktop();
try {
d.browse(new URI("www.google.com"));
} catch (IOException ex) {
ex.printStackTrace();
} catch (URISyntaxException ex) {
ex.printStackTrace();
public static void main(String[] args) {
EventQueue.invokeLater(new HTMLViewer());
}If that's not what you're looking for you need to ask more specific questions. -
How to open html file in forms6i ?
Hi Guys,
Can anyone help in out in this regards.How to open .html file in forms6i ?
Thanks in advance
rajCheck out WEB.SHOW_DOCUMENT.
Regards
Grant Ronald
Forms Product Management -
Please help - How to export HTML file into MS word format
How to export HTML file into MS word file without any change
in design format?
As I have been trying to do that but problem is coming in
formating. Table's witdth and height get disturbed in MS word when
I import the html file.
What I do after creating HTML in dreamweaver I save that file
into .txt format in dreamweaver. and then import it in MS Word. And
I tried too much for it but invain.
Please help me in finding the way of solution.
Please help me as my job is in trouble. It's very urgent
pleeease help me. I'll be thankful to you.Just open the HTML file in Word.
Walt
"apollo321" <[email protected]> wrote in
message
news:gavbhd$6j4$[email protected]..
> How to export HTML file into MS word file without any
change in design
> format?
>
> As I have been trying to do that but problem is coming
in formating.
> Table's
> witdth and height get disturbed in MS word when I import
the html file.
>
> What I do after creating HTML in dreamweaver I save that
file into .txt
> format
> in dreamweaver. and then import it in MS Word. And I
tried too much for it
> but
> invain.
>
> Please help me in finding the way of solution.
>
> Please help me as my job is in trouble. It's very urgent
pleeease help me.
> I'll be thankful to you.
>
Maybe you are looking for
-
Imovie won't open since upgrade to Mountain Lion
Just upgraded to Mountain Lion and now Imovie won't open. It tries, but then shuts down with error message. Tried repairing disk permissions and rebooting. Any Help appreciated.
-
I have gone through FAQ and tried all methods and checked settings in my iMac and my iOS devices (iPhone 4s and iPad2) and still can't useRemore app to control iTunes. I have used this app without a problem before with my old iPhone 3 and it worked f
-
I just bought a new iPad and I want to bring over all my apps from my first iPad but I don't have a computer, do I just set up an icloud account and upload all the things from my first iPad and then connect the new iPad to the icloud using the same a
-
Hi I am trying to do Goods Issue with PI sheet in SAP v4.7c. I have used the following characteristics however only the finish product and the qty comes up in the PI Sheet. can any one please let me know what should be done to have components assigne
-
Why doesn't my EarPods with 3.5 mm work with my iPod touch and my MacBook Pro?
I have an iPod touch 4g and a Macbook Pro that i bought on October of 2013. I have an EarPod 3.5mm but it won't work witht these items. Should it work? Should it not work? You can hear sounds but they are unclear or you cannot hear them at all if you