Representing text >250 in a XML file

sirvent80sirvent80 Member Posts: 3
Hi guys!
Let's see if somebody could give me some tips on this topic.
What I basically want to do is to export an XML file with a tag containing a description with more than 250 char.
What I mean is something like this:

<description>"This test must be bigger than 250 char..."</description>

The data comes from a temporary table that I create to sum all the fields I need from other tables, and I can't find a proper solution since:

-BLOB data type stores the information as binary code.
-I can only use Bigtext as a variable but no as data type in a table.

Thanks in advance from a newbie!

Comments

  • jlandeenjlandeen Member Posts: 524
    You can stream data into and out of a BLOB. If you use the C/SIDE Reference Guid and look up the WRITE and READ commands they have examples on how to stream data into and out of BLOB Objces. Note that I pulled this directly from the WRITE help item.

    Example: How to stream a BigText to a BLOB field in a table.

    Variables:
    bstr - BigText
    table - record variable with a field called BlobField that is of type BLOB
    ostream - OutStream
    bstr.ADDTEXT('This is the text string that we want to store in a BLOB field.');
    table.BlobField.CREATEOUTSTREAM(ostream);
    bstr.WRITE(ostream);
    table.INSERT();
    
    Jeff Landeen - Sr. Consultant
    Epimatic Corp.

    http://www.epimatic.com
  • sirvent80sirvent80 Member Posts: 3
    I know that I can store bigtext into a BLOB data type, but I have the problem when I export the info to a XML file, the information in the tag containing the BLOB data type looks like this:

    <description>*</description>

    ...and I need something "legible".
  • jlandeenjlandeen Member Posts: 524
    I've seen some problems with longer strings in XML and Nav.

    One of the other things you may have to do is intercept the Outstream from the XML Port and use the XML DOM API's to modify the data in a specific element (i.e. the Description Element). It's not really a pretty solution but it may be what you need to do to get around this particular problem that you are experiencing.
    Jeff Landeen - Sr. Consultant
    Epimatic Corp.

    http://www.epimatic.com
Sign In or Register to comment.