replace the Cdata using updateXML

XML is stored in an XMLTYPE COLUMN
When I extracted the data before an update code looks like this:
<gp:Script xmlns:gp="http://namespaces.globalplatform.org/systems-profiles/1.1.0"><![CDATA[

               GPSystem.trace("Entering OpenSecureChannel Script.");
               
               // Create a new Secure Channel 01 Protocol object *****************
               var level = arguments[0];
               GPSystem.trace("Level requested is "+level);
               var sc = secureChannel;
               GPSystem.trace("Secure Channel: "+sc);
               GPSystem.trace("Attempting Initailize for Update.");
               if(version == undefined)
                    version = 0;
               GPSystem.trace("     initializeUpdate("+version+",0);");
               response = new ByteString(sc.initializeUpdate(version, 0), HEX);
               GPSystem.trace("Initialize for Update executed with response "+response);
               if (response == null) {
                    throw new Error("Initialize Update command failed");
               }

               // Set the life cycle *********************************************
               GPSystem.trace("Current secure channel state is "+sc.state);
               switch (sc.state) {
               case SC_CLOSE:
                    GPSystem.trace("Secure Channel state "+sc.state+" corresponds to SC_CLOSE");
                    break;
               case SC_INITIALIZE:
                    GPSystem.trace("Secure Channel state "+sc.state+" corresponds to SC_INITIALIZE");
                    GPSystem.trace("Attempting to set the encryption key.");
                    GPSystem.trace("Key version = " + response.bytes(10,1));
                    if(true)//response.byteAt(10) == 0xFF)
                    {
                    GPSystem.trace("All keys values = "+key.ISK_M.getComponent(Key.DES));
                         sc.setEncKey(key.ISK_M);
                         sc.setMacKey(key.ISK_M);
                         sc.setDekKey(key.ISK_M);
                    }else
                         if(response.byteAt(10) >= 0x01)
                    {
                         GPSystem.trace("     setEncKey("+key.KDCenc.getComponent(Key.DES)+");");
                         sc.setEncKey(key.KDCenc);
                         GPSystem.trace("Attempting to set the MAC key.");
                         GPSystem.trace("     setMacKey("+key.KDCmac.getComponent(Key.DES)+");");
                         sc.setMacKey(key.KDCmac);
                         GPSystem.trace("Attempting to set the key exchange key.");
                         GPSystem.trace("     setDekKey("+key.KDCkek.getComponent(Key.DES)+");");
                         sc.setDekKey(key.KDCkek);
                    }

                    break;
               case SC_OPEN:
                    GPSystem.trace("Secure Channel state "+sc.state+" corresponds to SC_OPEN");
                    break;
               default:
                    GPSystem.trace("Secure Channel state "+sc.state+" corresponds to an unrecognized state");
                    Throw("Card is in an unrecognized state");
                    break;
               }

               // Perform an External Authenticate *******************************
               GPSystem.trace("Attempting External Authenticate.");
               GPSystem.trace("     externalAuthenticate("+level+");");
               sc.externalAuthenticate(level);
               GPSystem.trace("SecureChannel has been opened");
               ]]></gp:Script>
I run the update as follows
update ci_profile
   set profile_text_xml = updateXML(profile_text_xml,
                                 '/ApplicationProfile/SecureChannel/OpenSecureChannel','/gp:Script<![CDATA[

               GPSystem.trace("Entering OpenSecureChannel Script.");
               THIS IS MY TEST 
               // Create a new Secure Channel 01 Protocol object *****************
               var level = arguments[0];
               GPSystem.trace("Level requested is "+level);
               var sc = secureChannel;
               GPSystem.trace("Secure Channel: "+sc);
               GPSystem.trace("Attempting Initailize for Update.");
               if(version == undefined)
                    version = 0;
               GPSystem.trace("     initializeUpdate("+version+",0);");
               response = new ByteString(sc.initializeUpdate(version, 0), HEX);
               GPSystem.trace("Initialize for Update executed with response "+response);
               if (response == null) {
                    throw new Error("Initialize Update command failed");
               }

               // Set the life cycle *********************************************
               GPSystem.trace("Current secure channel state is "+sc.state);
               switch (sc.state) {
               case SC_CLOSE:
                    GPSystem.trace("Secure Channel state "+sc.state+" corresponds to SC_CLOSE");
                    break;
               case SC_INITIALIZE:
                    GPSystem.trace("Secure Channel state "+sc.state+" corresponds to SC_INITIALIZE");
                    GPSystem.trace("Attempting to set the encryption key.");
                    GPSystem.trace("Key version = " + response.bytes(10,1));
                    if(true)//response.byteAt(10) == 0xFF)
                    {
                    GPSystem.trace("All keys values = "+key.ISK_M.getComponent(Key.DES));
                         sc.setEncKey(key.ISK_M);
                         sc.setMacKey(key.ISK_M);
                         sc.setDekKey(key.ISK_M);
                    }else
                         if(response.byteAt(10) >= 0x01)
                    {
                         GPSystem.trace("     setEncKey("+key.KDCenc.getComponent(Key.DES)+");");
                         sc.setEncKey(key.KDCenc);
                         GPSystem.trace("Attempting to set the MAC key.");
                         GPSystem.trace("     setMacKey("+key.KDCmac.getComponent(Key.DES)+");");
                         sc.setMacKey(key.KDCmac);
                         GPSystem.trace("Attempting to set the key exchange key.");
                         GPSystem.trace("     setDekKey("+key.KDCkek.getComponent(Key.DES)+");");
                         sc.setDekKey(key.KDCkek);
                    }

                    break;
               case SC_OPEN:
                    GPSystem.trace("Secure Channel state "+sc.state+" corresponds to SC_OPEN");
                    break;
               default:
                    GPSystem.trace("Secure Channel state "+sc.state+" corresponds to an unrecognized state");
                    Throw("Card is in an unrecognized state");
                    break;
               }

               // Perform an External Authenticate *******************************
               GPSystem.trace("Attempting External Authenticate.");
               GPSystem.trace("     externalAuthenticate("+level+");");
               sc.externalAuthenticate(level);
               GPSystem.trace("SecureChannel has been opened");
               ]]>',
                               'xmlns="http://namespaces.globalplatform.org/systems-profiles/1.1.0"'
 )
where profile_id = '2A864886FC6B640103'
and existsnode(profile_text_xml,'/ApplicationProfile/SecureChannel/OpenSecureChannel/Script','xmlns="http://namespaces.globalplatform.org/systems-profiles/1.1.0"')=1
Now, all I'm doing here is to replace the! CDATA section so I'm just copy the original section and replace as well as 'The PRESENT IS MY ESSAY' on the inside.

I see that I lose the format from the beginning of the tag. Pointers to where I'm wrong here?

Hello

in the update clause ' / gp: Script '.

try to update the value of gp: Script only using text()

Update ci_profile
Set profile_text_xml = updateXML (profile_text_xml,
' / ApplicationProfile, SecureChannel, OpenSecureChannel, Script / text () ',' '
'xmlns = "http://namespaces.globalplatform.org/systems-profiles/1.1.0" ')
where the...

Ants

Tags: Database

Similar Questions

  • Replace the Image using different directory

    6.6.1 OSX 10.11.3's speech

    How to replace a picture of presentation with another image that lives outside of iPhoto?

    I see no possibility to browse other directories outside of what is already within iPhoto. If this is the case, then this is terribly limited. I'm working on a project I'll replace a lot of images with and I don't want to drop them or use iPhoto to do this.

    Thank you!

    Any help would be appreciated, if there is a way to directly access the iPhoto directory via the Finder that would work too.

  • Replace the sky using only lightroom?

    Anyone know how to take a picture view of the sky and add it to another photo in Lightroom? I found lots of tutorials online, but they all require you to have Photoshop, too.

    I have Lightroom, so I was wondering if anyone has the steps on how to replace a sky if you also do not have Photoshop.

    Cannot be done in Lightroom.

    You need to use Photoshop or Photoshop Elements.

  • Replace the Ifs using design Pattern

    Hi guys,.

    I have a class that receives an error code and define an associated error message. So, to avoid the nested ifs, I'm looking for a solution using the model maibe.

    {if (returnCode.Equals("052"))}
    Errors.Add ("error", new ActionError ("error.msg", applicationResources.getMessage ("errors.myerror52")));

    {if (returnCode.Equals("055"))}
    Errors.Add ("error", new ActionError ("error.msg", applicationResources.getMessage ("errors.myerro55")));

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

    For each new error code and your respective message, I need to add a new one if in the class...

    I accept some suggestions to do is better!

    Thank you very much!

    There are a number of approaches you could take. The validity and the relative value of some of them depend on the question whether the return code is really a string or a number formatted as a string. on the question of if you call always just errors.add (), just with different arguments, or if you need take completely different measures in some cases; on return codes how there; How often the codes will be added, changed, or deleted.

    1. a code card--> object encapsulating the args to errors.add (back)

    2. order model, which could be carried like a map of return code--> instance of a class that implements how to handle this code, or code return--> object class or class name, which then is instantiated, and the new run object. In both cases, the object that performs the processing will implement an interface that you define.

    3. a table whose index is the code back and whose value is an object, the object class or name of the class that handles this particular code.

    4. an enum with each enumeration value with either a different set of fields must be passed to errors.add () or a different implementation of a method, if you do not simply call errors.add () for each code.

    5. a switch statement on the return code, such as an int or an enum, or, if you are on Java 7, as a string.

    A little regardless of which of the above approaches you take, you must decide if you want to hard-code the code--> action, or if you want to put it in a configuration file or the database mapping.

  • How to replace the image that contains clickable images?

    I use RoboHelp HTML 8. Some of my help topics have an image that contains several interactive images that allow the user to click to see, for example, the field or button definitions on objects on this image. In the past, I was able to grasp or to create a new image file and give it exactly the same name as the old image file (for example, ccm_assessment_shg.gif)-a new replacing the old. and when I saw the image in RoboHelp HTML, the new image contain still all image maps of the original image.

    However, now I see an image (.png) file in one of my subjects and I would like to replace it, but my old process 'replacement with the same name' does not seem to work. What is my problem? How can I do this in RoboHelp 8? Is the problem related to the file must be a gif instead of a png? (I must confess that it's been several months that I worked in RoboHelp, so I just forgot something. I can't find instructions on the use of image maps and self-help groups).

    Thanks a lot for all the good advice!

    Hello

    Exactly how you try to replace the image? I ask, because if you open the dialog box Image and work this way, you will probably lose the connection with the regions of image maps. My preferred method is to simply work completely behind RoboHelp back by replacing the image using Windows Explorer. RoboHelp should be none the wiser as long as the file name and location are the same.

    See you soon... Rick

    Useful and practical links

    Wish to RoboHelp form/Bug report form

    Begin to learn RoboHelp HTML 7, 8 or 9 in the day!

    Adobe Certified RoboHelp HTML Training

    SorcerStone blog

    RoboHelp EBooks

  • Action to replace the contents of a smart object

    I use CS5/PS to create a collage created multiple images (smart object layers) that I've positioned using clipping masks.

    I would like to be able to replace the content of the images, which I can do via layer > smart objects > replace contents..., but I would like to have an action for a process of 'one-click' instead of three clicks.  Problem is, when I try to record the action, it forces me to complete replacement, and then the action gets wired to replace the image used in the 'record' action and therefore does not allow me to select which image I'd like to use.

    This feature is available in PS Elements, so I think it's possible.  I don't know that miss me something pretty basic, I do not know what!

    Thanks in advance,

    Brian

    «Separate forums Photoshop Windows and Macintosh will become read-only on Tuesday, January 3«»

    "Have you checked the ' enable/disable/shut down dialog box"-checkbox next to the item in the Actions Panel.

  • Satellite A135: Vista will not start after replacing HARD drive using the recovery disk

    Toshiba Satellite A135-s7403 HARD drive failed, I have replaced the 80 GB with a WD Scorpio blue 250 GB hitachi. When I try to restore with recovery disk came with the laptop, it passes through two discs 1 and 2 and starts with the start-up of windows for the first time and then runs to the greenish with the spinner blue screen please wait... thne black screens for a second or 2 and then back to spinner, please wait and then it appears the box "installation of windows could not configure windows to run on hardware. This computer' only option is to click OK.

    Where to click ok, you get an another msg that says "windows could not complete the installation, install reinstall windows. I tried like 50 times now. Startup Repair indicates the root = failure cause while the installation program is underway. I know that my drive are good, as I adjusted used then about a month when I upgraded the memory because the original memory 512 MB was not enough o well running vista.

    Hello
    To be honest I n don't know what the problem is there but can you get the original installation disc of Microsoft and try to install the OS, just to see if the OS installation will complete successfully?

  • Is it possible (or useful) to replace the processor in my HP Pavilion Elite m9060n...

    Is it possible (or useful) to replace the processor in my media library of Rikouman Pavilion Elite m9060n PC... There an IPIBL-(Berkeley) motherboard with Intel Chipset G33. Intel Core 2 Quad Logo running up to 2.4 GHz. is there a processor more fast which will be taken in the Socket 775 and improve the operating speed? It is economically interesting if possible? Would be very happy comments from some computer guru, as I'm obviously a novice.

    Morrismomic, welcome to the forum.

    The existing processor is Quad core maximum that you can use.  Your only choice is the Core 2 Duo E6700 or E6850:

    http://support.HP.com/us-en/document/c01197633

    Personally, I'm not sure you'll see an appreciable performance gain with either.  The memory and the video card are major concerns, too.  The system is as strong as its weakest component.

    If your problem is solved, please click "accept as a Solution.

  • I have the network wireless with an extreme airport using my base station that dessert 4 Airport expresses. I want to replace the base station with a time capsule from apple.  Are there specific instructions other that connect the new time capsule

    I have a wired to the internet using my base station for 4 expresses the hard extreme airport.  I want to replace the base station with a time capsule.

    It is also easy to replace the existing base station and adding the name of the network and the password?

    You should be able to transfer your configuration of your current access point to new, and then you would just set up the internal drive, try to look at these articles:

    ith-new http://www.TechRepublic.com/article/apples-Airport-extreme-out-with-the-old-in-w.

    -one-airport-extreme-or-time-capsule-to-http://www.iclarified.com/31189/How-to-Transfer-Your-configuration-settings-fromanother

  • How to replace the units of a channel using scripts % 3F

    Hello

    I have a few questions about the manipulation of the channel property 'unit' by scripts.

    Case 1: If the unit in the chain is not specified in the properties, what command should be used to add the inside unit?

    Case 2: When I create using the string ' Call.Root.ChannelGroups (1). Channels.Add ("name", DataTypeFloat64, 1)', empty space of unity being, what other command can be used which was available to the units to the breast?

    Case 3: Consider that I have channel (channel A) with the already defined unit (x), how can I replace the unit with another (y)? (Units of x and there belong to different physical quantities, so the ChnUnitConvert)

    Pls let me know if you nee details on the same.

    Kind regards

    Fazil Shah.

    Hi Fazil,

    The key word for SCRIPT DIAdem units is "unit_string". If you open the SCRIPT and open the channel property list you can select the property unit and drag & drop it in the SCRIPT Editor. This creates the code of script for the property.

    Case 1
    You have the options of towing: a quallified assignment complete or a channel object variable (if you have more settings for the channel of the second alternative is better)

    Data.Root.ChannelGroups (1). Channels ("mychannel"). Properties ("unit_string"). Value = "MyUnit.

    or

    Dim oChn
    Set oChn = Data.Root.ChannelGroups (x). Channels ("mychannel")
    oChn.Properties ("unit_string"). Value = "MyUnit.

    case 2
    You must add the unit after the creation of the channel

    Set oChn = Data.Root.ChannelGroups (x). Channels.Add ("MyChannel", DataTypeChnFloat64)
    oChn.Properties ("unit_string"). Value = "MyUnit.

    case 3
    It's the same as case 1 or if you do not want to use an already existing channel device, it can look like this

    oChnA.Properties ("unit_string"). Value = oChnB.Properties ("unit_string"). Value

    I hope that answers your questions

    Greetings

    Walter

  • HP Pavilion 14-b017cl: follow-up on creating and using the USB key recovery to win 8 after replacing the bad hard drive

    I have 2 hp pavillion sleekbook model 14-b017cl'. I replaced the hard drive in my son after that she doesn't have the "optimized hard drive dst test '. I used my sleekbook work to create a USB stick recovery. I followed the instructions to use the recovery to Win 8 usb drive. When I started the laptop of my son, with the USB stick inserted, I got this message.

    PXE - m0f: exit pxe rom

    no bootable device-insert bootdisk and press a key

    Flash player Flash when I put under tension. I rebooted, you press F2, conducted an audit on the new hard drive, happened.

    Later, I inserted the recovery key in my laptop (that I used to create it) and it would not initialize to top. I checked the content to the flash drive and they seemed "Chargers", so it seems to be what I expected. It seems that the recovery USB STICK will not work if my own laptop dies. What I have to buy the HP flash drive, or I'm doing something wrong.

    Hi @gretschman7,

    Thank you for your query.

    I understand you are trying to perform a recovery from a USB flash drive, but you get the error "pxe - m0f: exit pxe rom.

    "no bootable device-insert bootdisk and press any".  You check the recovery media on your laptop as it is the same model and it seems fine.

    Looks like you may need to change the boot sequence. Here is a link to HP - performing a recovery system (Windows 8) HP computers that will help you.   Here is a link to a YouTube video which can also help:.  Performing a recovery of HP system on a laptop HP with Windows 8.

    Please let me know the results.

    Thank you for your participation in the Forums of HP! We want to help you as well as others who may encounter a similar problem as you. Please consider tagging the post in order to solve your problem as "accept as Solution" to help other members of the community!

    To show recognition for my efforts please click the Thumbs Up below.

  • When you use quicklaunch to open a web page, if I already have an open page, how can I open a second page or pages using an icon from quick launch without closure or replacing the one I already opened?

    When you use quicklaunch to open a web page, if I already have an open page, how can I open a second page or pages using an icon from quick launch without closure or replacing the one I already opened?

    Hi Haubhaus,

    I know one thing to get your links to always open in a new window:
    1. Right-click on your desktop, select new, then shortcut
    2. Type "" C:\Program may Explorer\IEXPLORE. "." EXE" and click Next
    3. Name the shortcut (for example: Microsoft Home) and click Finish
    4. Right-click on the new shortcut and select Properties
    5. In the target box, arrow over until the end of the path, add a space and add -new (WEBSITEPATH). When your finished, your path should look like this:
      "" C:\Program may Explorer\IEXPLORE. "." "EXE" - new www.microsoft.com
    6. Click OK and try it!
    Let me know if it works or if I can be of further assistance!

    Cody C
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • I replaced the hard drive in my system. How can I reinstall Windows and use my key to activate it?

    Vista operating system software

    I have a HP laptop running windows vista.  The crashed(non-recoverable) of hard disk and I have replaced the material.  I have a valid license key of Vista code and would like to know if I can download vista and use my codekey to activate it on the original laptop which has windows vista sticker Home premium OEMAct on the back.

    Hello

    There is no Windows Vista downloads available from Microsoft.

    You can contact HP and ask them to send you a set of recovery disks.

    They should do this for a small fee.

    http://h20566.www2.HP.com/portal/site/hpsc/public/help/contactHP/home/?AC.admitted=1340852823523.876444892.199480143

    To reinstall Vista using their recovery disk/s, you start from the 1st recovery disk they provide and follow the manufacturer's instructions to reinstall:

    You need to change the Boot order to make the DVD/CD drive 1st in the boot order:

    How to change the Boot order in BIOS:

    http://pcsupport.about.com/od/fixtheproblem/SS/bootorderchange.htm

    "How to replace Microsoft software or hardware, order service packs and replace product manuals.

    http://support.Microsoft.com/kb/326246

    Some manufacturers have more available Vista recovery disks.

    If this happens, you may need to try this instead:

    You can also borrow and use a Microsoft Vista DVD, which contains the files for the different editions of Vista (Home Basic, Home Premium, Business and Ultimate) must be installed. The product key on your computer / Laptop box determines what Edition is installed.

    Other manufacturers recovery DVDs are should not be used for this purpose.

    And you need to know the version of 'bit' for Vista, as 32-bit and 64-bit editions come on different DVDs

    Here's how to do a clean install of Vista using a DVD of Vista from Microsoft:

    "How to do a clean install and configure with a full Version of Vista '

    http://www.Vistax64.com/tutorials/117366-clean-install-full-version-Vista.html

    And phone Activation may be necessary when you use the above installation method.

    "How to activate Vista normally and by Activation of the phone '

    http://www.Vistax64.com/tutorials/84488-activate-Vista-phone.html

    See you soon.

  • Windows 7 recovery discs using after replacing the hard drive

    My son has a Toshiba Satellite 115-S1100 netbook. Somehow he completely erased everything on this thing. When I tried to run Windows Recovery discs 7 32 bit Home Premium, I get a message 'no operating system found'. Toshiba support told me that I needed to replace the internal hard drive. I am a novice computer. Once the new disk in, these discs will work? Is there something special that needs to be done, or should I just run the disks? Also, given that the netbook is not a hard disk, I will be their execution via an external dvd drive. Will this work? Any help or pointers would be much appreciated. Thank you.

    My son has a Toshiba Satellite 115-S1100 netbook. Somehow he completely erased everything on this thing. When I tried to run Windows Recovery discs 7 32 bit Home Premium, I get a message 'no operating system found'. Toshiba support told me that I needed to replace the internal hard drive. I am a novice computer. Once the new disk in, these discs will work? Is there something special that needs to be done, or should I just run the disks? Also, given that the netbook is not a hard disk, I will be their execution via an external dvd drive. Will this work? Any help or pointers would be much appreciated. Thank you.

    Hey devtrev

    you would follow toshibas tips for the use of their recovery disk

    It's their recovery process

    and here's the visat forums

    and issues of windows 7

    Windows 7 forums on the link below

    http://answers.Microsoft.com/en-us/Windows/default.aspx#tab=2

    Answers by topic

    Walter, the time zone traveller

  • I accidentally lost some jpeg files using movement and replace the function when transffering in a new folder. Where will the replaced files?

    I moved some images in a folder, some of the images already in the folder had the same name as the new scanned images IE 1 Scan, Scan 2 etc. I used the move and replace the folder without thinking that I was in a hurry. I still need replaced images but now I can not find them I thought that they would have ended up in the trash, but they aren't there?

    You can download some like this free data recovery software to recover deleted files.

    1 panda Recovery http://www.pandorarecovery.com

    2 recuva http://www.snapfiles.com/get/recuva.html

    3. undelete more http://undelete-plus.com/

    How does it work?

    When you delete a file on the FAT32 or NTFS file system, its content is not erased the disc, but only the reference to the data file in the file Table of Allocation or the master file Table is marked as deleted. This means that you might be able to recover files deleted, or to be visible through the file system again.

Maybe you are looking for