OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Trimming the White Space Before loading to the Database

I want to insert the XML data file in the DataBase.For that I am using a
CLOB to stored the parsed document to it and then insert that CLOB to the
table.This is working fine and all the values in the XML files are getting
loaded to the database properly but the problem is coming when there is
White Tags in some values of the XML file.(Because then the TAG size is
exceeding the size of the column defined in the Database.Is there any method
by which i can trim the leading and trailing whitespaces and then load the
values.Please help me out.it's very urgent
I think like
xmlgen.resetOptions,xml.setRowTag,xmlgen.setIgnoreTagCase...there should be
some function that can trim the white spaces from the TAG values...Please
let me know it some reference is available on net

Defining the CLOB
 lv_main_clob   	CLOB := NULL;
Creating the Parsing Document
 lv_parser := xmlparser.newParser;
 lv_doc := xmlparser.getDocument(lv_parser);

Writing the Parsed Document to the clob
 xmldom.writeToClob(lv_doc, lv_main_clob);

/* -------------------------------
Insert clob into Table

insert_Clob_To_Table( pi_tag_name,pi_temp_table)
            xmlgen.resetOptions; -- Reset options 
  	xmlgen.setRowTag(pi_tag_name); -- Setting row tag  
	xmlgen.setIgnoreTagCase(xmlgen.IGNORE_CASE); -- Ignore tag case 
  	lv_rows_inserted := xmlgen.insertXML(pi_temp_table,lv_main_clob);