getMetadata: CRLF in XMLTYPE after 2000. caracter

Hello

I use 12 c with APEX 4.2 where I have the following table:

CREATE TABLE LETS_PICTURE
  (
    PICTURE_ID  NUMBER CONSTRAINT NN_PICT_PICTUREID NOT NULL ,
    CASE_ID     NUMBER CONSTRAINT NN_PICT_CASEID NOT NULL ,
    FILENAME    VARCHAR2 (500 CHAR) ,
    DESCRIPTION VARCHAR2 (500 CHAR) ,
    PICTURE     BLOB ,
    PREVIEW     BLOB ,
    MIMETYPE     VARCHAR2 (500 CHAR) ,
    CHARSET         VARCHAR2 (500 CHAR) ,
    EXPOSUREDATE DATE ,
    ADDRESS      VARCHAR2 (200 CHAR) ,
    POSTCODE     VARCHAR2 (10 CHAR) ,
    CITY         VARCHAR2 (50 CHAR) ,
    REGION       VARCHAR2 (50 CHAR) ,
    COUNTRY      VARCHAR2 (50 CHAR) ,
    LONGITUDE    NUMBER (9,6) ,
    LATITUDE     NUMBER (9,6) ,
    EXIFDATA     XMLTYPE ,
    CREATEDBY_FK NUMBER ,
    CREATEDON    DATE ,
    ISDELETED    CHAR (1 CHAR) DEFAULT 'N' CONSTRAINT NN_PICT_ISDELETED NOT NULL
  ) ;

With an element of APEX file browser, I load a JPG file directly in this table. Because the first file browser element inserts the file and make then one update to all other columns, I create the preview of the image with the following trigger:

CREATE OR REPLACE TRIGGER TRG_BEF_UPD_PICTURE
    BEFORE UPDATE
    ON LETS_PICTURE
    REFERENCING OLD AS OLD NEW AS NEW
    FOR EACH ROW
DECLARE
    thumb BLOB := NULL;
    oiimage ordimage := NULL;
    oithumb ordimage := NULL;
   metav XMLSequenceType; 
BEGIN
    IF nvl(length(:NEW.PICTURE),0) > 0 AND LOWER(:NEW.MIMETYPE) LIKE 'image%' THEN  
        dbms_lob.createtemporary(thumb, true, dbms_lob.call);

        oiimage := ordimage(:NEW.PICTURE);
        oiimage.setproperties();
        oithumb := ordimage(thumb);

        oiimage.processcopy('maxScale=200 200', oithumb);
        :NEW.PREVIEW := oithumb.getcontent();
    
        metav := oiimage.getMetadata('EXIF'); 
        :NEW.EXIFDATA := metav(1);
    
        dbms_lob.freetemporary(thumb);
    END IF;
END;
/

I downloaded the file again and compared to the original - the file and its data EXIF is quite ok - so the question of file browser does not destroy any information.

But the XML data in the column EXIFDATA have a linebreak after 2000. character:

<exifMetadata xmlns="http://xmlns.oracle.com/ord/meta/exif" xsi:schemaLocation="http://xmlns.oracle.com/ord/meta/exif http://xmlns.oracle.com/ord/meta/exif" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <TiffIfd>
      <Make tag="271">Canon</Make>
      <Model tag="272">Canon EOS 400D DIGITAL</Model>
      <Orientation tag="274">top left</Orientation>
      <XResolution tag="282">72.0</XResolution>
      <YResolution tag="283">72.0</YResolution>
      <ResolutionUnit tag="296">inches</ResolutionUnit>
      <DateTime tag="306">2013-10-29T10:33:43</DateTime>
      <YCbCrPositioning tag="531">co-sited</YCbCrPositioning>
   </TiffIfd>
   <ExifIfd tag="34665">
      <ExposureTime tag="33434">0.016666668</ExposureTime>
      <FNumber tag="33437">5.0</FNumber>
      <ExposureProgram tag="34850">Normal program</ExposureProgram>
      <ExifVersion tag="36864">0221</ExifVersion>
      <DateTimeOriginal tag="36867">2013-10-29T10:33:43</DateTimeOriginal>
      <DateTimeDigitized tag="36868">2013-10-29T10:33:43</DateTimeDigitized>
      <ComponentsConfiguration tag="37121">YCbCr</ComponentsConfiguration>
      <ShutterSpeedValue tag="37377">5.906891</ShutterSpeedValue>
      <ApertureValue tag="37378">4.64386</ApertureValue>
      <ExposureBiasValue tag="37380">0.0</ExposureBiasValue>
      <MeteringMode tag="37383">Pattern</MeteringMode>
      <Flash tag="37385">
         <Fired>Yes</Fired>
      </Flash>
      <FocalLength tag="37386">70.0</FocalLength>
      <FlashpixVersion tag="40960">0100</FlashpixVersion>
      <ColorSpace tag="40961">sRGB</ColorSpace>
      <PixelXDimension tag="40962">3888</PixelXDimension>
      <PixelYDimension tag="40963">2592</PixelYDimension>
      <FocalPlaneXResolution tag="41486">4433.2954</FocalPlaneXResolution>
      <FocalPlaneYResolution tag="41487">4453.6084</FocalPlaneYResolution>
      <FocalPlaneResolutionUnit tag="41488">inches</FocalPlaneResolutionUnit>
      <CustomRendered tag="41985">Nor
mal process</CustomRendered>
      <ExposureMode tag="41986">Auto exposure</ExposureMode>
      <WhiteBalance tag="41987">Auto</WhiteBalance>
      <SceneCaptureType tag="41990">Standard</SceneCaptureType>
   </ExifIfd>
   <InteroperabilityIfd tag="40965">
      <InteroperabilityIndex tag="1">R98</InteroperabilityIndex>
   </InteroperabilityIfd>
</exifMetadata>

So, as you can see on line 36 file XML is not valid more. For this reason, I can't access the XML with any operation XMLTYPE data.

When I stop the trigger and remove the linebreak by updating the following statement EXIFDATA works:

DECLARE 
  myXMLType XMLType;
BEGIN 
  SELECT EXIFDATA
  INTO myXMLType
  FROM lets_picture
  WHERE picture_id = 1;

  DBMS_OUTPUT.PUT_LINE('Namespace: ' || myXMLType.getNamespace() );
  DBMS_OUTPUT.PUT_LINE('Root Element: ' || myXMLType.getRootElement() );
END;

But not this one:

SELECT t.picture_id, x.*
FROM lets_picture t,
  XMLTABLE ('/exifMetadata/TiffIfd'
            PASSING t.exifdata
              COLUMNS Make VARCHAR2(200) PATH 'Make',
                      Model VARCHAR2(200) PATH 'Model') x
WHERE t.picture_id = 1;

So my questions are:

1. How can I avoid the linebreak in the EXIF-XML data after 2000. character?

2. why the XMLTABLE in the last SELECT statement works only when the element root in the XML contains no attributes like this:

<exifMetadata>
   <TiffIfd>
      <Make tag="271">Canon</Make>
      <Model tag="272">Canon EOS 400D DIGITAL</Model>
...

I'm looking for a really long time to fix this, so I hope someone can help me.

Best regards, Christian

Christian,

I do not reproduce the problem on my db. Metadata is created OK.

Are you sure that's not a problem with your client tool?

Could you try in SQL * Plus, with these settings:

SQL > set lines 200

SQL > set 200 pages

SQL > set long 5000

SQL >

SQL > select xmlserialize (document metaexif dash) metaexif

2 from photos

3 where id = 1;

METAEXIF

--------------------------------------------------------------------------------

"http://xmlns.Oracle.com/ORD/Meta/EXIF" xsi: schemaLocation = ".

http://xmlns.Oracle.com/Ord/meta/EXIF http://xmlns.oracle.com/ord/meta/exifxml «»

NS:xsi ="http://www.w3.org/2001/XMLSchema-instance" > ".

Canon

Canon DIGITAL IXUS 850 IS

at the top left

180.0

180.0

inches

2013 12-25 T 15: 11:59

centered

0,00125

2.8

0220

2013 12-25 T 15: 11:59

2013 12-25 T 15: 11:59

YCbCr

5.0

9.65625

2.96875

0.0

2.96875

Model

NO.

No function Strobe return

Auto

Yes

NO.

4.6

0100

sRGB

3072

2304

13653.333

13633.136

inches

Area of the colors of a chip

DSC

Normal process

Auto exposure

Auto

1.0

Standard

R98

Tags: Database

Similar Questions

  • all samples n transferred from the buffer

    Hi all

    I have a question for every N samples transferred DAQmx event buffer. By looking at the description and the very limited DevZones and KBs on this one, I am inclined to believe that the name is perfectly descriptive of what must be his behavior (i.e. all samples N transferred from the PC buffer in the DAQmx FIFO, it should report an event). However, when I put it into practice in an example, either I have something misconfigured (wouldn't be the first time) or I have a basic misunderstanding of the event itself or how DAQmx puts in buffer work with regeneration (certainly wouldn't be the first time).

    In my example, I went out 10 samples from k to 1 k rate - so 10 seconds of data. I recorded for every N samples transferred from the event of the buffer with a 2000 sampleInterval. I changed my status of application of transfer of data within the embedded memory in full with the hope that it will permanently fill my buffer with samples regenerated (from this link ). My hope would be that after 2000 samples had been taken out by the device (e.g., take the 2 seconds) 2000 fewer items in the DMA FIFO, it would have yielded 2000 samples of the PC for the FIFO DMA buffer and so the event fires. In practice it is... not to do so. I have a counter on the event that shows it fires once 752 almost immediately, then lights up regularly after that in spurts of 4 or 5. I am at a loss.

    Could someone please shed some light on this for me - both on my misunderstanding of what I'm supposed to be to see if this is the case and also explain why I see what I see now?

    LV 2013 (32 bit)
    9.8.0f3 DAQmx
    Network of the cDAQ chassis: 9184
    cDAQ module: 9264

    Thank you

    There is a large (unspecced, but the order of several MB) buffer on the 9184.  He came several times on the forum, here a link to an another discussion about this.  Quote me:

    Unfortunately, I don't know the size of this buffer on the 9184 on the top of my head and I don't think it's in the specifications (the buffer is also shared between multiple tasks).  This is not the same as the sample of 127 by buffer slot AO which is present on all chassis cDAQ - controller chassis ethernet / wireless contains an additional buffer which is not really appropriate I can say in published specifications (apparently it's 12 MB on the cDAQ wireless chassis).

    The large number of events that are triggered when you start the task is the buffer is filled at startup (if the on-board buffer is almost full, the driver will send more data — you end up with several periods of your waveform output in the built-in buffer memory).  So in your case, 752 events * 2000 samples/event * 2 bytes per sample = ~ 3 MB of buffer memory allocated to your task AO.  I guess that sounds reasonable (again would really a spec or KB of...) I don't know how the size of the buffer is selected).

    The grouping of events is due to data sent in packages to improve efficiency because there is above with each transfer.

    The large buffer and the consolidation of the data are used optimizations by NOR to improve flow continuously, but can have some strange side effects as you saw.  I might have a few suggestions if you describe what it is you need to do.

    Best regards

  • Problem of backlight flicking of HP Pavilion dv4-1412tx

    I have a 2 years old Hp Pavilion dv4-1412tx laptop and recently I have a problem with my backlight of the screen. It wobbles a lot and sometimes totally blackoff when I have the screen at certain angles of tilt. It wobbles too much even when I slightly move or shake the laptop. I changed the inverter, but the problem remains. I feel is wrong with the cable/Ribbon that connect the screen on the main body of the laptop. I checked upward with a local computer store and they told me that there is no spare parts for the connector of cable/Ribbon for my particular model. I even made reference interview dv4 guide manual that I downloaded from the hp site and I can't find any references to this particular piece. Is there anyone can help?

    Hi, Benjamin,.

    Yes. I just got my replaced dv4-1412tx LCD cable and it works fine now. It took almost 3 weeks for research technician and wait for the new cable to arrive. The part S/N is DC02000IO00-screen LCD - PA (the characters after 2000 is alphabet 'io' not '10'). You can do a google search and even get it on ebay.

    http://www.eBay.com/Sch/i.html?_nkw=dv4+LCD+cable

    This seems to be a common problem for older models dv4. If you google on the web, you will see a lot of people are facing the same problem. I wish the Hp technical support team can read this message and give appropriate assistance to those in need.

    I hope this info will help. Good luck!

  • TDMS Viewer and excel display different data

    Hello

    I have a problem of reading/viewing my PDM file. My file contains 37 channels and about 7 000 samples per channel. (Just this file... Later, I have to develop on many more ~ 150 k samples per channel)

    Now my problem is: if I open the PDM file with VI TDMS files Viewer, it starts to change the channel after ~ 1000 samples (Channel 29-37(MM1-MM9) should always be-32768, but after 1000 samples, the channel passes their place

    My analysis of switching: after ~ 1000 channels 29-37(MM1-MM9) is the 11-19 after ~ 2000 on 30-1 after ~ 3000 on 12-20, etc...

    Besides the switching channel there is a block of lines ~ 30 only filled every 0 ~ 1000 samples

    But if I open the file in Excel with the PDM-Addin is to show the correct data. Why is this and how to fix the Viewer?

    Hope you understand what I'm trying to say

    I have a my TDMS attached as a ZIP file, could not fix a PDM directly.

    It must be a bug of PDM, not the file viewer component. We will go is studying the issue. Workaround for you call the node "PDM defragment" to defragment this file, then it might appear correctly in the Viewer.

    According to your file, I found that the file has been created by TDMS Advanced knots. You define 10000 samples for an interlaced channel, but you write only 499 samples for a channel in writing. I suggest setting the sample counts exactly acrrording how are going to write.

  • Clone HD over to the new system won't boot to the top

    I'm updating the PC of my church. I cloned the HD with XP Pro OS and moved to the new system. When I did it start. It goes into a loop of reboot.

    I realize now, the issue has to do with the settings.

    So, how can I get this to work on the new PC?

    I was told on the use of R 'option of repair, but in the past, it drops me to a command promt. (DOS)

    Which will work?

    When I tried this and chose the reader wonder an administrator password.

    I used the password for the only user on the system, but it did not work.

    This system is just after 2000 and I have no idea that if someone had placed an admin password in it.

    I wonder what are my other options then setting fresh on a new HD.

    If the original PC came with Windows pre-installed, it is impossible to return to a new system.

    If you have a retail CD of Windows XP, it allows to do a repair install on the new system so that Windows can face the new material.

    By default, the password for the administrator account is empty (that is, no password).

  • What is the latest version of Robohelp which can export to 4 Winhelp. HLP?

    Hello.

    We have been working with Robohelp X 5 for "some time" now and due to some problems with 'later' Word versions (I think any office after 2000 gives us problems), so we want to renew our license to the most recent possible version.

    We tried Robohelp 9 (there Robohelp for Word and it can export to 4 Winhelp (.hlp) format).

    We also tried 11 Robohelp and na not find Robohelp for Word or Winhelp 4 export opportunities.

    What is Robohelp 10? Does anyone know if she Robohelp for Word AND exportable to Winhelp 4?

    Thank you in advance.

    RoboHelp for Word 10 has the same outputs as Rh9. If you have a license for 9, I would look more deeper into what changes there have been. Probably only support for 2010.

    If you don't want to upgrade to, you will need to find a supplier of software with Adobe boxes are not HR more long expedition for Word 10.

    Better yet, given the support Windows for the format HLP, is not time to spend?

    See www.grainge.org for creating tips and RoboHelp

    @petergrainge

  • Measure of consumption

    Hello

    Does anyone know if there is software Vmware or another 3rd party provider that allows to measure our energy consumption of our 5 servers before virtualize us them?  We want to take a before and after snapshot of energy saving to a Vmware.

    An outside vendor came in the other day and said Vmware had a tool that allows us to do and oversight.  Is this true?

    Thanks in advance.

    Moogeboo

    Lanamark Suite provides estimates of power consumption very good for most of the servers manufactured after 2000. It does not measure the actual energy consumption, but it has a fairly granular model that takes the installed processors, form factor of account, etc., County of processor... Lanamark Suite also provides you with carbon, cost of food, heat dissipation and other valueable energy measures. I hope this helps.

  • Portege 2000 - cover sensor/special keys do not work after installing XP?

    Windows XP SP2 is installed on a drive formatted on a Portege 2000 previously configured to run Win 2000 factory.
    After the installation of all downloads for Windows XP available on the Toshiba site have been added.
    The Toshiba special keys for browser and Toshiba console now do not work and the lid sensor
    to get the computer to sleep or into hibernation do not work when the lid is closed.
    She will be in hibernation if you press function f4. The XP was installed came not from Toshiba.
    Help? Thank you very much.

    Hello

    The fact is that the Toshiba power saver controls the hibernation mode, and the day before.
    Here, you can configure this option.
    AFAIK closing cover option you can set only on the eve of setting power off or no action. You cannot set to Hibernate.
    In the energy saver, you will need to use the Details button. In the system power mode, you can configure this action.

    Good bye

  • Satellite L10 - Hotkey.exe error after booting Windows 2000

    I've installed Windows 2000 on my Satellite L10 rather
    XP. After installing the utility Hotkey-I get an Error Message at every boot:

    Hotkey.exe - Entry Point not found
    The procedure entry point WTSUnRegisterSessionNotification could not be loaded into the WTSAPI32.dll dynamic link library.

    Same error Message When you try to manually start the Hotkey.exe.

    How can I solve this problem? The system works, but the
    Keys not.
    Thank you in advance for help!

    P.S.: As I read on the web, this error has nothing to do with the missing operating system XP - maybe the HotKey software does not work with Windows 2000. Where can I get a Hotkey software work for Windows 2000 for Satellite L10?
    I try to find it on the download from Toshiba site, but there is that some drivers for the L10 on Toshiba.com and the European server are only readers for XP :(

    Hi turmeric

    All the drivers, tools, and utilities are designed separately for each operating system. This means that you can not use tools designed for Windows XP Home edition with other operating system. You don't find utilities and tools because your device is not supported for the Windows 2000 operating system.
    I'm sorry.

  • Portege 2000 cannot start after suspend

    Hi guru,.

    I'm new to this forum. So I looked through the first forum hoping to get an answer to my problem before posting, but no good result.

    Here's my problem. My portege 2000 works before brilliantly. But last night, while I was trying to configure my APM suspend (this is the first attempt to suspend), the problem, the system freezes! Then I tried to restart, can not remember I turn it off by pressing the button for a few seconds or unplug the hand because of the power key is not, in any case I have wait a few seconds after that, then turn on the power again, but the system seems to be dead, the AC power led is under voltage green LED, battery was not in the slot so no sign for her, the small button Fn LED told me this Fn key works well, but the caplock key does not work because its LED is not turn on after pressing, the screen is blank, or should say it is not powered on, the hard drive does not turn.

    So I unloaded the system by unplugging it from the main. After a while I swhitch on once again, the laptop is still in the same situation. Therefore, I tried to unload everything, disconnect the hand, open up the laptop, unplug the CMOS battery, wait for a while (15-20 minutes), then put it back on, but no joy.

    I did some research on Google at this time and read the knowledge base on the web site of Toshiba, seems the problem come with BIOS, who say that the system does not start if the power is off during suspend mode for the original version of BIOS (later healed). So, I decide to Flash a BIOS to most recent version. I have a pc card floppy drive, so I download the BIOS and create the floppy, then I use the key to update the BIOS to power on the laptop, luckily this time it works, "ready to update bios" screen appear. But when I press the key on the keyboard, it seems that it does not access the pc card floppy drive.

    By this incident, I think that the material has no problem, but the system is in standby for ever. Guru of the idea?

    Therefore, I have 2 questions:
    1. how to make it back to the start mode so that I can start my system? I need this as well according to the Readme of the BIOS update package, it should be in start mode, no interruption/recovery mode.
    2. how flashing a new bios in this situation? Do I need a USB floppy drive to do the BIOS to recognize that there is a drive so that I can Flash a new bios in there? Or the system will analyze not for material in this mode 'freezes '?

    Sorry about the long story, but I think I must tell him that you guys understand the situation and what I've tried so far.

    Additional information on my system, I'm under debian linux etch on this laptop, and everything that happened after I typed the command "apm-s". But it seems to me that it is the problem of BIOS problem OS?

    Thanks in advance.

    concerning
    Colin

    Hello

    First question: How did you install the operating system if the laptop will not start?

    I'm a bit confused Mr. I put t you know what means the boot mode.

    If the laptop has been completely stopped down so it s in the boot mode (standby or hibernation mode don t mix).
    If you want to update BIOS please make sure the BIOS is good and that you use the right update procedure.

    Where did you find the information that the BIOS update will solve this problem?
    In any case, for me, it looks more like an electrical problem on the motherboard.

  • Satellite Pro 6000 lost DVD/CD Rom drive after upgrade to win 2000 sp4

    Help, please! I have a laptop Toshiba SP 6000 and after download win 2000 sp4 on the internet have completely lost my CD-ROM/DVD-Rom drive. When I go to my computer and Device Manager it has a yellow I and following the warning "windows cannot load the driver that windows is unable to locate relevant data' and it has error code 31? I've been on the Toshiba site but don't know which update to take! I really need help.

    Hello

    Well, it the very strange question s. normally after the installation of the new operating system must be recognized the CD/DVD driver.
    I have studied in the web and find nice websites that describes this problem.
    Check this site:
    http://TechRepublic.com.com/5208-11183-0.html?forumid=89&ThreadId=181561&start=0
    http://support.Microsoft.com/kb/q270008/
    http://support.Microsoft.com/default.aspx?scid=KB;%5BLN%5d; Q314060

    Good luck

    Good bye

  • laptop HP 2000: screen turns black with cursor indicating after the password is entered first turning on pc

    Bought this pc at Wal-Mart-mart December 2013, it's a 2000 hp notebook pc with windows 8 when you turn the pc press the keys to enter my password of the user, and after I entered my password screen goes black except the white arrow, proposed by the mouse pad will not do anything after that

    Enter the BIOS by typing/holding the F10 key immediately after switching on the laptop. Use Diagnostics test your hard drive and memory.

  • Laptop HP 2000: HP Notebook 2000-power on password/admin password: deactivated after 3 attempts.

    Laptop requires power-on password/admin password; system becomes invalid after 3 password attempts failed.  The disabled system code is: 95840774.

    Model # = HP 2000-bt69WM

    Product # = C2M21UA #ABA

    Serial No. = [personal information]

    Your help in this matter will be greatly appreciated!

    Sincerely,

    kt10doll

    Hello.

    Come in:

    20728370

  • HP Notebook 2000 - Power we or Admin password SYSTEM OFF after 3 trys

    I have a laptop of HP 2000, Windows 8 / / / My 2 year old nephew ahold got my laptop, and now she's asking an administrator password or power on password. I did not have a password, so I'm stuck on this screen. Anyone know what I can do? Help, please! The code to disable the system, I get after 3 attempts is 93868171... I would really appreciate someones expertise on that... Thank you kindly in advance...

    Jose

    Hello

    Enter: 22740177

    Kind regards

    DP - K

  • HP 2000-2c22DX Notebook PC: HP 2000 - black screen after login

    Hi, I have a hp 2000 laptop that has a black screen after I login. I have used F9 or ESC tab and follow the directions shown by others with the same problem, but nothing has changed. Sometimes he goes to the site of Regclean Pro I installed when I got the Pc, but suffice it to say you have error and difficulty buying Regclean. I once the buy, but nothing has changed. Please help, I have a lot of photos that I don't want to lose. Thank you

    Try to install the free version of MalwareBytes. After the installation to run a full analysis:

    https://www.Malwarebytes.org/products/

Maybe you are looking for