Dynamically add attributes to elements (XMLType)

Hello

I get a stream from a Web Service that I load in an XMLType XML variable. I want to then insert the XML into an XMLType column that conforms to an XSD that I registered in XDB. The problem I have is that the XML code actually does not set the attribute xsi: schemaLocation so I can not load in my XMLType column because of the ORA-19007 schema and element do not match

Is it possible that I can dynamically change the XML and add the attribute xsi: schemaLocation in the root node?

Thank you very much

Tom Casserly

PS. I use Oracle XDB 9.2.0.4

Tom

It was address in 10.1 or 10.2, where we will try to automatically mount the XML to the defined schema. I guess that the upgrade is not an answer. has the method createSchemaBaseXML() on the XMLType 9.2.0.4.0.

M

Tags: Database

Similar Questions

  • Dynamically add attributes to xmlelement

    Hello

    I'm trying to dynamically add attributes to an xmlelement. All attributes are stored in a table.
    So what I create a column that contains the attributes in a single line, for example: "sal" = "1000" mgr = '9827.

    So now, I have a query like this:
    select XMLElement(evalname ename)
    from emp;
    Gives me:
    <scott></scott>
    <james></james>
    ...

    What I want to do is to add this attribute to the element, then I me
    <scott "sal"="1000" mgr="9827"></scott>
    ...

    What I've tried is:
    select XMLElement(evalname e1.ename, XMLAttributes(e2.my_attributes))
    from emp e1, (select ename, '"sal"="100" "mgr"="9876"' my_attributes from emp) e2
    where e1.ename = e2.ename
    But which translates:
    <SCOTT MY_ATTRIBUTES="&quot;sal&quot;=&quot;100&quot; &quot;mgr&quot;=&quot;9876&quot;"></SCOTT>
    Someone at - it an idea how to get arround this? I tried with updateXML but I always quotes that have escaped.
    Or is there a better way to dynamically add attributes that are stored in a table?

    Thank you very much.

    Kind regards
    Dimitri
    ----------------------------------
    http://dgielis.blogspot.com/
    http://www.apex-evangelists.com/

    While we are

    SQL>  select * from xmltable('for $i in ora:view("dept")/ROW
                              return element {$i/DNAME}
                                 {for $j in ora:view("emp")/ROW[DEPTNO=$i/DEPTNO]
                                                  return attribute {$j/ENAME} {$j/EMPNO}
                                 }
                             ')
    /
    COLUMN_VALUE
    ----------------------------------------------------------------------------------------------------
    
    
    
    
                                                                                         
    
    5 rows selected.
    

    ;)

  • How to dynamically add new FlowElement elements to existing through markup TLF TextFlow

    Is there a way to create a new item of FlowElement (for example a DivElement) of markup text without having to go through the TextFilter.importToFlow function?

    What I'm trying to accomplish is the following:
    I have an already built TextFlow.
    I get a text I want to inject into the TextFlow as a new item somewhere in the existing TextFlow.

    The method I use to achieve this is to create a second TextFlow from markup via the importToFlow function. Can I get the second flow element and make a deepCopy of it in a new item 'not known '. Finally, I use this new 'owner' element in my main code by adding it as a child of the original TextFlow.
    My function that focused.
    Thank you.
    Tim

    There isn't anyway to do today without the help of importToFlow.

    Looks like what you want is similar to innerHTML and innerXHTML. Ideally, TLF would be offered to the implementations for getInnerTLFMarkup and setInnerTLFMarkup for use as described below. I also suspect that if TLF should implement these features today we would use importToFlow under the hood.

    read the markup
    var flowElement:FlowElement = getFlowElement();
    var tlfMarkup:String = getInnerTLFMarkup (flowElement);

    write the tag
    var flowElement:FlowElement = getFlowElement();
    var tlfMarkup:String = getTLFMarkup();
    setInnerTLFMarkup (element flowElement, tlfMarkup);

  • JS - Can XML Question - I add attributes using Javascript?

    I want to add an attribute to an element tag, but I don't see how to do it programmatically. Is this possible? Also, is it possible to appoint a tag element dynamically? For example:

    How to add a child element is to use the appendChild as follows:

    XMLObject.appendChild(<childElement/>);
    XMLObject.childElement= "something";
    

    or just add it like this:

    XMLObject.childElement = "something";
    

    Right? (Side Question: is there a difference between these two methods?).

    What I want to do, is to add a dynamic attribute to a child named statically, or to create a child named dynamically.

    I could not understand this. Any ideas?

    Maybe take a look at Mozilla's E4X tutorial: https://developer.mozilla.org/en/E4X_Tutorial/

    There is no need eval() here. (There are usually not.) Use:

    XMLObject.appendChild(<{nameReference}/>);
    

    To add an attribute, you can use:

    XMLObject.@new_att = "the value";
    

    Jeff

  • Dynamically add custom headers in ListView

    I'm working with a ListView which is based on a api, that I have no control.

    I dynamically add some custom headers subject see the following as to what I am referring to (A, B)

    http://developer.BlackBerry.com/native/reference/Cascades/bb__cascades__listview.html

    How can I dynamically add these? For example, I want to add a conflict between the first element of the list and the second

    Section A

    Header

    Item B

    Point C

    Hi Philippe,.

    To do this, you must use a custom list item component.

    Heres how I could do that

     


    Moreover, in the custom "Header" just create a structure as follows:

    IF/ELSE ON A FLAG

    if(someflag == "header"){
         //use header style
    }else{
       // show normal list style
    }
    

    My Code

    ListView{
    dataModel: ArrayDataModel{
       id: myDataModel
    }
    
    listItemComponents: ListItemComponent
    {
        Container{
           layout: StackLayout{
              orientation: LayoutOrientation.TopToBottom
           }
           Label{
              text: ListItemData // complete data string
           }
           Label{
              text: ListItemData.split("~")[0]
            }
            Label{
              text: ListItemData.split("~")[1]
            }
           Label{
              text: ListItemData.split("~")[2]
            }
        }//end Container
    }//end ListItemComponent
    
    onCreationCompleted: {
       //The data inside append is one item.
    
       //let's append a bunch of data
       for(var i=0;i<30;i++){
           //append 30 list items
           myDataModel.append("Header~Some data whatever~Status");
       }
    }
    }
    
    • In my example I am adding data to the model.

    ListItemData - the full string

    ListItemData.split("~") [0] - first part etc.

    • I shared parts of the data with a single symbol. In my case the «~»
    • To get the data I want to that I just throw a ListItemData.split("~"). It breaks the string into 3 parts.
    • I will be able to access somewhere I want using the notation ListItemData.split("~") [index]
    • You can include paths to images, or whatever the text you

    AS IF THIS HELPED YOU!

  • How can I add attributes to all images in a stack?

    It is absurd that you can not add attributes to all elements in a pile without developing the battery (therefore defeat the purpose). Does anyone found a workaround for this?

    Workaround: If you shift - click on the badge of the stack in the upper left corner of a cell, extend it with all its selected photos.  While you add metadata, it will be added to each of them.

    You can use the Syncomatic plugin to copy the metadata and/or develop settings from the top of chimneys for the other photos in the batteries.

    Others have requested an option to control this behavior.  Please add your vote and opinion on this in the Adobe official feedback forum: Lightroom: when you select a stack collapsed, provide opportunity to apply the changes to all the photos in the stack

  • Adding dynamic transitional attribute to seeds VO

    Hello

    I do a substitution of controller of the basket as iProcurement who gets a reference to the seeded page PoRequisitionLinesVO. He then walks lines checking a condition in each line. I want to dynamically add an attribute to the VO so that for each line, I have the attribute transient STATUS which will be displayed in an item in plain text on the shopping cart page. I want to do it dynamically without a substitution of VO.

    I tried to use the VO method addDynamicAttribute and it does not raise an error, but I'm not sure how to set this attribute through a reference to the line. I can find no mention of how dynamically create a transitional attribute for VO.


    Kristofer Cruz

    Hello

    You can add the attribute using addDynamicAttribute and then do setAttribute by traversing the line to set a value.

    See this thread it has code to add attribute transient
    Re: problem with attribute transient attach to standard vo of the controller

    If you want you can customize the page to add RawText or you can also do to the controller.

    Why you don't want to VO Substitution?

    -Idris

  • Dynamically add UIComponent without refreshing entire page (JDEV 11.1.1.3)

    Hi all
    I have this problem.

    I need to dynamically add an element within a page without refreshing entire page jspx.

    For example, look at this page:


    Titus: _
    Name: _______
    Job: _ (+ add more jobs)

    When I click on (+ add more jobs), I add a new RichInputText:

    private RichPanelBox pb1;

    public String cb1_action2() {}
    RichInputText rc = new RichInputText();
    rc.setId (...);
    [....]
    This.PB1.GetChildren (). Add (RC);
    Returns a null value.
    }

    The field is displayed properly on the page, but the system do a full refresh and lose your position on the page.

    Obviously becomes inconvenient for the user to have to scroll the page up to a certain point where it was before.
    Is it possible to avoid this problem and to add the field without a complete refresh of the page?

    Thank you
    Cristian

    Published by: on February 11, 2011 baol 7,53

    Try with PartialSubmit for the button and use PPR as follows:

    JSPX Code:





    partialSubmit = 'true '.
    actionListener = "#{SamplePageBean.onAddJobs}" / >




    Bean code:

    public class SamplePageBean {}
    private RichPanelBox panelBox;

    public SamplePageBean() {}
    }

    {} public void onAddJobs (ActionEvent actionEvent)
    RichInputText richInputText = new RichInputText();
    richInputText.setId ("Id1");
    richInputText.setLabel ("Job Title");
    this.panelBox.getChildren () .add (richInputText);
    AdfFacesContext.getCurrentInstance () .addPartialTarget (this.panelBox);
    }

    {} public void setPanelBox (RichPanelBox panelBox)
    this.panelBox = panelBox;
    }

    public RichPanelBox getPanelBox() {}
    After a return;
    }
    }

    Thank you
    Nini

  • Add attributes to the class IMAQdx

    I have a Subvi change several attributes of the camera; However, none of these attributes are included in the class IMAQdx.  Therefore, I have to use a long doubling property node where each value, I want to view or change, I must first write this attribute as current attribute.  Is it possible to add attributes to the class, so they will fill in the list of nodes of property of the attributes of the camera?

    Sorry, no, it is not possible today. We are actively seeking improvements API to address this kind of problem in the future versions, however. Out of curiosity, are properties youj are eager to change provider-specific or are common already specified by the features Standard Naming Convention (http://www.emva.org/cms/upload/Standards/GenICam_Downloads/GenICam_SFNC_2_2.pdf)

    Eric

  • How to dynamically add a plot to a graph of mixed signals

    I have a graph of mixed signals where I'm plotting a signal from a time axis. I'm trying to dynamically add a second plot to this graph against the same time axis (with a different scale of Y), but when I built a 2D array and try to connect in the graph (using a local variable) I get an error of size mismatch. I know for sure I did in the past (cable tables with different sizes for a same MSG) with no problems but, today, for some reason any I can't solve this problem.

    Am I missing something?

    Yes, you're probably writing a table 1 d somewhere that is causing to accept only 1 d. To address your problem above, just put a table node build in whenever you have a 1 d table and it will be just a 2D array with a single line of data.

    To add a field to your current locations, your screenshot above should work once the plot knows that he has to accept the 2D tables.

    Reading from a local variable, change something and then write about it once again can lead to a lot of issues down the line. Race conditions are a pain in the butt, so get rid of that sort of thing is good to do from the start. I didn't know the rest of your code, so I don't know how you treat it, but just keep in mind that you add to your software.

  • Write to the file of measurement with a loop For using the value of the dynamic data attributes

    I looked and looked, but couldn't find a solution for this.

    I currently have 15 points of different data that I try to write in an Excel file.  I have all combined in a table and lie with the function "write into a file position.  However, the column names are always "Untitled", "Untitled 1" etc.  I then used the function 'Set the Dynamic Data attributes'; but for this I have to do 15 different functions "set data dynamic attributes.  It was suggested to use a loop with the function 'Set the Dynamic Data attributes' inside of her, but I can't find how do.

    I have several arrays consisting of 15 different values for 'Signal Index' 'Name of Signal' and 'Unit', but also a unique 'get Date/Time In Seconds' related to 'Timestamp '.  The problem is that the error I get when I try to connect the output with Scripture at the entrance to measure file:

    The source type is dynamic data table 1 d.  The type of sink is Dynamic Data.

    How can I fix it?  I have attached a picture of my installation; Sorry if this is gross (I'm new on this!).  Thank you!

    It will get rid of the error, but it is not quite correct. What you need to do after that is to click on the output or the tunnel entry and select 'replace with the shift register. In addition, the array of values that you have wired to the Signal Index is wrong. Arrays are 0 based. Just wire the iteration Terminal here. And, finally, take the size of the table and this connection to the N terminal are stupid. Don't wire nothing to this.

  • How to dynamically add an Option in the drop-down list?

    I have this code:

    {Drop-down list

    ID: list

    Title: 'list '.

    onCreationCompleted: {}

    opion var = new Option();

    opion. Text = "Hello";
    opion. Value = 4;

    List.Add (opion);

    }

    }

    After the launch of the application, the list is empty.

    Why my code does not work?

    It is easy to dynamically add options

    first add this to your attachedObjects:

    ComponentDefinition {
                id: optionDefinition
                Option {
                }
            }
    

    then do something like this

    var newOption = optionDefinition.createObject()
                newOption.text = ...
                newOption.value = ...
                newOption.description = ...
                newOption.selected = ....
                yourDropDown.add(newOption)
    
  • Dynamically add tabs QML from C++

    Hello world

    I have a simple TabbedPane defined in QML.  I am trying to reference the TabbedPane via C++ to dynamically add tabs.  Is this possible?  With my current setup, the application starts and crashes then with:

    Process 22253787 (MyTabsApplication) terminated SIGSEGV code=1 fltno=11 ip=79310524(/base/usr/lib/libbbcascades.so.1@_ZN2bb8cascades10TabbedPane6removeEPNS0_3TabE+0xf3) mapaddr=00110524. ref=00000010
    

    Here is the code:

    TabbedPane {
        id: mytabs
        objectName: "mytabs"
    
        Tab {
            title: "Tab 1"
            FirstPageView {}
        }
        showTabsOnActionBar: false
    }
    

    C++ :

    ApplicationUI::ApplicationUI(bb::cascades::Application *app) :
            QObject(app) {
    
        QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(this);
        qml->setContextProperty("app", this);
    
        AbstractPane *root = qml->createRootObject();
    
        TabbedPane *tabbedPane = root->findChild("mytabs");
        Page* page = Page::create();
        Tab* tab = Tab::create()
                     .title("tab2")
                     .description("This is only shown in the side bar");
        tab->setContent(page);
        tabbedPane->add(tab);
    
        app->setScene(root);
    
    }
    

    Thank you!

    Try to declare your root as:

    TabbedPane *tabbedPane =  qml->createRootObject();
    

    As TabbedPane is a class of AbstractPane

  • How we can dynamically add or remove action from the popup menu in qml item

    Hi all

    I want to just dynamically add or remove action from the actionset item in the contextual menu especially in qml.

    Thanks in advance.

    Kind regards

    Ankur

    You can do so by joining the actionitem as attachedObjects. Once the page is complete (signal onCreationCompleted), you can add it to the page using addAction()

    To remove, you simply delete the page using removeAction()

    https://developer.BlackBerry.com/Cascades/reference/bb__cascades__page.html

  • Add-PSSnapin: an element with the same key has already been added

    When you run Add-PSSnapin, I get the above error. This seems to happen if I try to add the snap a second time, but when this happens, none of the power CLI commands are then available up to what the server is restarted.

    Add-PSSnapin: an element with the same key has already been added.

    At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\

    + Add-PSSnapin $SnapinName;

    +     ~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo: NotSpecified: (:)) [Add-PSSnapin], ArgumentExcept)

    ion

    + FullyQualifiedErrorId: System.ArgumentException, Microsoft.PowerShell.Co

    mmands. AddPSSnapinCommand

    Failure of the attempts to remove the snap-in at this point with:

    Remove-PSSnapin: no Windows PowerShell snap-ins for the model

    "VmWare.VimAutomation.Core" were found. Check the pattern and then try the

    command again.

    At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\

    + Remove-PSSnapin $SnapinName;

    +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo: InvalidArgument: (VmWare.VimAutomation.Core:Stri

    NG) [Remove-PSSnapin], PSArgumentException

    + FullyQualifiedErrorId: NoPSSnapInsFound, Microsoft.PowerShell.Commands.R

    emovePSSnapinCommand

    I already tried to uninstall the dll and put it back, that makes no difference

    $dllpath = "C:\Program Files (x 86) \Vmware\Infrastructure\vSphere PowerCLI\VMWare.VimAutomation.VICore.Cmdlets.dll.

    $SnapinName = "VmWare.VimAutomation.Core".

    #get the path to instalutil

    $path = [System.Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory();

    #create an alise for installtuil

    set-alias installutil (resolve-path (join-path $path 'installutil.exe'));

    #uninstall snap

    InstallUtil /u $dllpath;

    InstallUtil $dllpath;

    I tried appdomain unloading, then adding the snap-in with the same result:

    $appdomain = [AppDomain]: CurrentDomain

    $appdomain. # Of unloading | Out-Null

    Add-PSSnapin "VMware.VimAutomation.Core".

    $appdomain. Load

    Everything simply jump beyond the error is not good because it is impossible to find the following commands:

    Add-PSSnapin "VMware.VimAutomation.Core" - ErrorAction SilentlyContinue

    Get - VM $VirtualMachine

    The term 'Get - VM' is not recognized as the name of a cmdlet, function, script file, or an executable program. Check the spelling of the name, or if a path has been included, make sure the path is correct, and then try again.

    Any help to fix this would be greatly appreciated.

    Thank you

    OK, I was kind of what went wrong here.

    The snap has been loaded from a powershell module. When the module is removed and added again, the snap ceases to function, but also can not be added again.

    If the snap is loaded first outside the module everything works fine until you try never to remove or add snap-in module.

Maybe you are looking for