How to save XML from a CLOB to  a text file (size over 32767 chars)

Hi,
I am trying to export a table into an XML file. Using various examples, I have learned that is really easy to handle objects smaller that 32767 bytes (characters).
The problem is working with big chunks. My XML CLOB is just over 10 MB in size. I can easilly break it into smaller pieces but then I risk to write chr(10) in the middle of a XML Tag (which happened). I have an idea of finding a way around the problem but there are two issues:
1. DBMS_LOB.instr function returns 0 if offset grows above appx 1100.
2. I tried this in oreder to avid the limitation from item 1.:
for c = 1..dbms_lob.getlength(CLOB) loop
dbms_lob.read(CLOB,c,1,MyString);
if MyString = chr(10) then
utl_file.put_line(MyLine);
MyLine := '';
else
MyLine := MyLine || MyString;
end if;
end loop;
This way I generate perfect XML structure, and it takes about an hour of cpu time to create 2.3 MB file. I have tried to run ir for a big one, and it took just over 7 hours to get to 10.2 MB when I had shut it down.
Does anybody has any suggestions?

supahsain08 wrote:
Well, you are not in my class and you don't even know my teacher
who are you to judge meHe is jaded by our experiences here. 99% of posters who complain that the teacher doesn't teach have adequate (note that I didn't say good) teachers, but it's the student who is failing to take responsibility for his own education. It is after all your responsibility and complaining won't help you any.
Good luck.

Similar Messages

  • How to save data from a waveform chart to a file?

    Hi! I have a question:how to save a real time data from a waveform chart? attachement is a example,how can i do to save the data from 0 second to 25 seconds to a file ?thanks!
    Attachments:
    example.vi ‏23 KB

    You can use a property node to get the chart history as a array. Then you can write that data to the file. The data in the array in you example can also be writen to a file. If you only wnat a portion of the data to be saved, use the Array Subset function to get the part you want.
    Lynn

  • How to Print Bytes[] from a resultset in a text file? Thanks a Lot!!

    Hi all I'm having a prb in printing the Byte[] from a Resultset in a textfile . Every time I exceute this program different values is printing in the text file and in binary format like:
    [B@29c3,[B@347a,[B@3f2f,[B@49e6,[B@549d
    and I'm supposed to get the out put as :
    0000690D,00002107,00009F16,00003008,0000ED0F
    Here is the sample code!
    public static void main(String[] args) {
         try {
    Class.forName(drvName);
    Connection con = DriverManager.getConnection(url, SDR_userName, SDR_passWord);
    Statement stmt = con.createStatement();
    int count1 = 0;
    char c = 'c';
    ResultSet rs1 = stmt.executeQuery(_sqlQuery);
    FileOutputStream fos = new FileOutputStream(inputFileName);
    Writer out = new OutputStreamWriter(fos, "UTF8");
    while (rs1.next()) {
    byte[] _id = rs1.getBytes(1);
    String _name = rs1.getString(2);
    out.write("_id=="+id+"==name=="+_name);
    int len = sales_account_id.length;
    System.out.println("Length==" + len);
    String s = new String(_id, 0, len, "UTF8");
    char c1[] = s.toCharArray();
    for (int i = 0; i < s.length(); i++) {
    System.out.print("s1" + c1);
    System.out.println("_Id" + s.toString());
    try {
    for (int i = 0; i < len; i++) {
    c = (char) _id;
    System.out.println("_Id" + c);
    catch (Exception statemets...){}
    Thanks a lot in advance!!

    out.write("_id=="+id+"==name=="+_name);
    in this line you are printing the array _id. when you do that ( print array ) you get the address of that array. so the output is expected.
    what you can do is create a new String from the byte array and write that string to the file.
    String temp = new String( _id );
    out.write("_id=="+temp+"==_name=="+_name);
    hope i got your problem right

  • How to save picture from an iPad on someone else computer

    how to save picture from an iPad on someone else computer.

    Why don't you save pictures to Dropbox?
    You don't have to save it on someone's computer
    http://i1224.photobucket.com/albums/ee374/Diavonex/b90c9d4d.jpg

  • How to save pics from facebook in nokia lumia 625

    I am using Nokia Lumia 625
    please tell me how to save pics from Facebook
    while using thanks 

    Sure it does;
    Select (TAP) the post you  like to save;
    Then TAP AND HOLD to select the save option
    Click on the blue Star Icon below if my advice has helped you or press the 'Accept As Solution' link if I solved your problem..
    Attachments:
    tap1.png ‏502 KB
    tap2.png ‏284 KB

  • How to receive XML from Flex HTTP POST

    Hi,
    We curreontly have a setup where we have a FLEX frontend send an XML through a HTTP POST and awaiting a response also in XML. On the backend this is handled relatively simply by a PHP script that basically does the following:
    read data (in XML)from FlEX HTTP POST into a new temp XML file.
    execute a c++ program with the XML file as one of the parameter.
    return the result to FLEX
    We have decided to move to BlazeDS for various reasons.
    Looking at the examples bundled with BlazeDS they have a jsp example that returns an XML result to FLEX so that part is fine. I am trying to find an example of JSP (or Servlet) that is able to read the XML data from FLEX and write it into a temp XML file. I would then try to use runtime.exec to invoke a local C++ program to process the XML file the result of which will be sent back to FLEX.
    Any help will be very much appreciated!

    <div class=Section1><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>I&#8217;d avoid calling an executable just to process XML &#8211;your<br />application server would provide enough support for reading and writing XML, no?<br />Also, if you&#8217;re only planning on working with XML then even BlazeDS might<br />be overkill because its focus is on sending strongly typed ActionScript data efficiently<br />to and from a client (it&#8217;s true that it does have a proxy service, but<br />that is not involved with processing the actual XML data).<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>How complex is your XML? Do you need to resolve ids and<br />references or can you parse it top down in a single pass? There are several<br />well known libraries in Java for dealing with XML &#8211; the choice depends on<br />how you need to interact with the XML. Most of them take an InputStream as a<br />source for reading XML and you can get the InputStream from the servlet<br />request. Googling should turn up numerous examples.<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>Pete<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'><br /><br /><div><br /><br /><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><br /><br /><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span<br />style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> khwong<br />[mailto:[email protected]] <br><br /><b>Sent:</b> Sunday, September 28, 2008 12:09 PM<br><br /><b>To:</b> [email protected]<br><br /><b>Subject:</b> How to receive XML from Flex HTTP POST<o:p></o:p></span></p><br /><br /></div><br /><br /></div><br /><br /><p class=MsoNormal><o:p> </o:p></p><br /><br /><p class=MsoNormal style='margin-bottom:12.0pt'>A new discussion was started by<br />khwong in <br><br /><br><br /><b>General Discussion</b> --<br><br />  How to receive XML from Flex HTTP POST<br><br /><br><br />Hi, <br><br /><br><br />We curreontly have a setup where we have a FLEX frontend send an XML through a<br />HTTP POST and awaiting a response also in XML. On the backend this is handled<br />relatively simply by a PHP script that basically does the following: <br><br /><br><br />read data (in XML)from FlEX HTTP POST into a new temp XML file. <br><br />execute a c++ program with the XML file as one of the parameter. <br><br />return the result to FLEX <br><br /><br><br />We have decided to move to BlazeDS for various reasons. <br><br /><br><br />Looking at the examples bundled with BlazeDS they have a jsp example that<br />returns an XML result to FLEX so that part is fine. I am trying to find an<br />example of JSP (or Servlet) that is able to read the XML data from FLEX and<br />write it into a temp XML file. I would then try to use runtime.exec to invoke a<br />local C++ program to process the XML file the result of which will be sent back<br />to FLEX. <br><br /><br><br />Any help will be very much appreciated! <o:p></o:p></p><br /><br /><div class=MsoNormal><br /><br /><hr size=2 width=200 style='width:150.0pt' align=left><br /><br /></div><br /><br /><p class=MsoNormal style='margin-bottom:12.0pt'>View/reply at <a<br />href="http://www.adobeforums.com/webx?13@@.59b69b23">How to receive XML from<br />Flex HTTP POST</a><br><br />Replies by email are OK.<br><br />Use the <a<br />href="http://www.adobeforums.com/webx?280@@.59b69b23!folder=.3c061a83">unsubscribe</a>< br />form to cancel your email subscription.<o:p></o:p></p><br /><br /></div><br /><br /></div>

  • HT3939 how to save number from call

    How to save numbers from call list?

    In Phone app, tap Recents, tap the Blue arrow of the number you are interested in and tap Create New Contact.

  • How to save down from InDesign Creative Cloud version to CS5? Have exported as .idml file but still get messages that plug-ins are missing although CS5 confirms it is fully updated.

    How to save down from InDesign Creative Cloud version to CS5? Have exported as .idml file but still get messages that plug-ins are missing although CS5 confirms it is fully updated.

    Yes. Thanks. I misled myself based on another post. Successfully did this by selecting "File," "Save a copy ..." then choosing "for CS4 or later (IDML)"
    It required some patience and several tries, but I think that was due to hardware (memory) being overloaded by CC Cloud version or something. It was a 50 MB, 500-page file and took 17 minutes to convert/save,
    Re-capping: from CCloud to CS5, don't use "Export" (to IDML); use "Save as" or "Save a copy" and select "for CS4 or later (IDML)".
    Advice much appreciated.

  • HT1665 How to save photo from iPad to external memory card?

    How to save photo from iPad to external memory card?

    It's very difficult.  I have read where some people have done this with much angst.  You can use the camera connection kit to load pictures to your iPad.  The reverse is not really supported.  A much simpler solution would be to email the photo to your home email account and then copy it to external memory. 

  • E61i -- HOW TO SAVE IMAGES FROM WEBSITE WHILE BROW...

    ANYBODY KNOWS HOW TO SAVE IMAGES FROM WEBSITE WHILE BROWSING IN E61i ???
    ABDULLAH SHAHID SHEIKH
    IMANGROUP, IMAN ROAD, NOORPUR, ALI BLOCK, MUSLIM TOWN, FAISALABAD, PAKISTAN.
    TEL. 0092418782792-93
    CELL. 00923008651424

    which version should i use ,, i mean suitable for my E61i,,, the opera mini or the opera mobile????
    is opera mini can save the images as well???
    25-Aug-200702:43 PM
    iantaylor27 wrote:
    Hi
    If you use opera mobile, it aloows saving of images to memory card etc
    www.opera.com
    ABDULLAH SHAHID SHEIKH
    IMANGROUP, IMAN ROAD, NOORPUR, ALI BLOCK, MUSLIM TOWN, FAISALABAD, PAKISTAN.
    TEL. 0092418782792-93
    CELL. 00923008651424

  • How to save photos from Facebook on Nokia Asha 210...

    Hi,
    Anyone know how to save photos from Facebook or from Facebook messenger on the Asha 210? Can't seem to find a way to save photos people post or send me to my phone.
    Thanks

    hi mate if there are no options within the Facebook app, the only other thing you can try is visiting the mobile version of the Facebook website thru the phone browser itself, and seeing if there is a save picture option in there..

  • How to save pictures from my iphone to my laptop?

    I dont know how to save pictures from my iphone to my laptop..

    Hi, do you know if this task can be programed to be executed automatically each time you conect your iphone to the laptop just like he digital cameras do?
    Regards

  • How to save xml output of fm into sap as xml

    how to save xml output of fm into sap as xml
    thank you,
    regards,
    Jagrut bharatkumar shukla

    Hi Jagrut
    The XML document can be stored in an ABAP variable rxml of the type STRING or XSTRING, or in an internal standard table sxml of the elementary line type C. Hence, I believe, your issue with the lenght can be resovled with this types.
    For rxml, you specify an interface reference variable of the type IF_IXML_OSTREAM that points to an IXML output stream.
    For rxml, you specify an interface reference variable of the type IF_IXML_DOCUMENT that points to an IXML document.
    With the stream factory you have several options. Before you call your CALL TRANSFORMATION, you setup your stream factory for these different options.
    1. You want to write the file to the application server file system. You want to create your OSTREAM as a binary string. In this example b_xml is an empty binary string. OSTEAM will be the reference variable of tyep IF_IXML_OSTREAM.
    ostream =
    streamfactory->create_ostream_xstring( b_xml ).
    You get the output lenght with the following:
    ressize = ostream->get_num_written_raw( ).
    You can then send the entire string to the file system with the following:
    transfer b_xml to filename1 length ressize.
    Also refer to this weblog:
    /people/tobias.trapp/blog/2005/05/04/xml-processing-in-abap-part-1
    Regards
    Ravish Garg
    <b>
    *Remember reward points is the best way to say thank you :)</b>

  • How to save attachment from email to I pad

    How to save attachment from email to I pad

    You first need an app on the iPad that supports the attachment type. When you have an app you should then be able to press and hold the attachment and use the 'open in' pop-up to save the attachment to that app.

  • HELP!!!! How to save xml file!!!Anyone can help???

    Hi,
    It is urgent for me to know how to save xml file. I use VC++6.0, Oracle xdk 9.0.0.0.0 or 9.0.0.0.0Abeta under windows98.
    It is OK to compile the program with print() method. But system will tell me there is illegal operation when I run it. If I delete the line with print(), the result will be normal.
    in class node, there is two functions
    void print(ostream *out = &cout, uword level = 0,uword step = 4);
    void print(DOMString buffer, size_t bufsize, uword level = 0, uword step = 4);
    Is there anyone who may tell me how to use them? to write back specific xml file?
    Without print(), I can not save the xml file...It seems in Oracle xdk9.0.0.0.0, there is no obvious function to save the file.(or because I am a new comer , not familier with DOM)
    Can anyone tell me how to save xml file? or just paste an example! It is very a little urgent to me...Hope you give me some ideas....
    Many thanks in advance!!!!
    yours,
    Fiena

    Hi,
    goto sxmb_adm > intergration engine configration > specific configration
    go in edit mode > new entry
    choose
    Category -> IDoc
    Parameters -> XML_CONVERSION
    current value -> 2
    Regards,
    Manisha

Maybe you are looking for

  • Switched from Dell to MacBook - External Hard Drive - Can't Modify - Help!

    Hello. I recently switched to a MacBook from a Dell Inspiron, hold your applause. Anyway, I have a 150GB SimpleDrive Deluxe External Hard Drive from SimpleTech that I saved all of my files (music, photos, documents, etc.) from my Dell. I have no prob

  • Boot Camp - removing a partition

    Hi, I created a parition in boot camp and later removed it. When I went to delete the parition boot camp said it had been deleted but the 10 gigs of space I had allocated to the windows parition was not allocated back to the Mac partition and the win

  • BAPI_POEC_CREATE

    Would anybody be kind enough to give me some example code for calling BAPI_POEC_CREATE !? I have used BAPI_POEC_GETDETAIL with existing POs to have a good look at what the data should look like. But despite all sorts of combinations of parameters and

  • Photoshop CS3 has encountered a problem...

    Well, I've spent 2 days trying to fix this issue on my own, it's time for me to reach out and find out if anyone out there can help me!  I can open a Photoshop image fine, but when I try to open a 2nd image (which I almost always do), I get an error

  • IMovie menu: Where is the background music icon?

    http://docs.info.apple.com/article.html?path=iMovie/7.0/en/11959.html There it says to click the backgrond music icon... What is that, and what does it look like? I can't find it. Thanks.