Using existsNode to find the attribute xsi: Nil

Hi all, I have a question about using existsNode who wasn't able to answer by searching the web and this forum so I hope someone here can point me in the right direction.

My colleague has a XML of the following structure (example is very basic):

< grandfather xmlns = "http://mycompany.com/somestring" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" >
< parent gender = 'male' >
< child xsi: Nil = "true" > < / child >
< / parent >
< / grandfather >

The XML is generated according to a schema using XMLBeans and can be validated without error.

Now, my colleague use the existsNode () - function in its PL/SQL-procedures to check if some nodes and attributes are defined.

existsNode (xml, ' / grandfather/mother ',' xmlns = "http://mycompany.com/somestring" ') returns 1 as expected

existsNode (xml, ' / granddad/parent/@gender ',' xmlns = "http://mycompany.com/somestring" ') returns 1 as expected

existsNode (xml, ' / grandfather/mother/child ',' xmlns = "http://mycompany.com/somestring" ') returns 1 as expected

BUT!

existsNode (xml, ' / granddad/parent/child/@xsi:nil ',' xmlns = "http://mycompany.com/somestring" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" ') returns 0.

We have tried different combinations of use that a single namespace with the prefix xsi in the XPath or not etc... But so far without success. Judging by the examples and the other correctly the work calls we thought the syntax must be correct. But it is obviously not. We don't get any of the error messages or the warning or the other.

Guidance on this subject would be greatly appreciated.

Thank you
Chris

Returns the value 0.

Not on my version of db:

SQL> with t as (select xmltype('
  2  
  3  
  4  
  5  
  6  
  7  ') xml from dual)
  8  select existsNode(xml, '/granddad/parent', 'xmlns="http://mycompany.com/somestring"') col1,
  9         existsNode(xml, '/granddad/parent/@gender', 'xmlns="http://mycompany.com/somestring"') col2,
 10         existsNode(xml, '/granddad/parent/child', 'xmlns="http://mycompany.com/somestring"') col3,
 11         existsNode(xml, '/granddad/parent/child/@xsi:nil', 'xmlns="http://mycompany.com/somestring" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') col4
 12    from t;

                COL1                 COL2                 COL3                 COL4
-------------------- -------------------- -------------------- --------------------
                   1                    1                    1                    1

1 row selected.

SQL>
SQL> select * from v$version;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Prod

Max
[My Italian blog Oracle | http://oracleitalia.wordpress.com/2010/01/17/supporto-di-xml-schema-in-oracle-xmldb/]

Tags: Database

Similar Questions

  • Get ' attribute xsi: Nil unauthorized pool of the element, which is not nillable.»

    I am trying to create a simple workflow that puts into service a virtual machine. below is the error message I get:

    Attribute xsi: Nil unauthorized pool of the element, which is not nillable.

    during the analysis of the CreateVM_Task method call information

    on line 3, column 2

    during the analysis of body SOAP

    row 2, column 1

    When parsing of SOAP envelope

    on line 1, column 38

    When parsing the HTTP request for the createVm method

    object of type vim. Folder

    on line 1, column 0 (workflow: create simple virtual machine / create the context (item0) #38)

    ReferenceError: 'vmResourcePool' is not defined. (Create workflows: simple VM Navicure / create the context (item0) #38)

    Here's what I've done, I've duplicated a workflow canned and have made adjustments in the workflow to automate an available to the virtual machine. the workflow that I duplicated is 'Create simple virtual machine', I kept all parameters with the exception of vmResourcePool. When I go to run the workflow, the error message above is displayed. I don't have pools of resources in my group, I have to have Pools of resources to provide for vco? I hope not. I wonder if there is something I will never forget in my workflow. Any help would be greatly appreciated.

    Best regards

    J.

    The API we use in 'Create Simple Virtual Machine' - createVM_Task() - creates the virtual machine and attach it to a pool of resources, it requires a resource pool parameter.

    API documentation is available on the Web, for example. for createVM_Task, you can watch https://www.vmware.com/support/developer/vc-sdk/visdk41pubs/ApiReference/vim.Folder.html#createVm

    -Ilian

  • using Explorer to find the .dll

    I'm trying to find a specific. DLL file in one of my programs that I installed on my vista machine. How to use the Explorer to find this file? I tried a lot of things but can not find. can someone help me please?

    Open 'computer' window and locate the name of the DLL.

  • Scipt OpenScript/Bank of data/hand scipt:Second used can not find the database file

    Hi all

    I want to palyback a main script containing three "scripts", two of them are the same script. Separately, they all can read successfully.
    For example, in the script 'Hand', there are 'A' 'B' 'A' script ssuccessively. and 'A' 'B' have their own databases respectively under "a data bank / ' and ' B/database /. Each database has two records in the .csv file.
    Now I'm reading 'Hand', the script of the child 'A' can run successfully then child script "B" run correctly too, but the second, run the script "A" says more no record and the main script to stop there.

    So, how can I do the 'Hand' performance full script without being stopped by the second script used 'A'?
    Thanks a lot for your help ^ _ ^!

    Kind regards
    Angyoung

    Hello

    Mention the database settings in initialize(), IE.

    public void initialize() throws Exception {
    ........
    getDatabank("DBAliasNAme").changeSettings("startindex=1:whenout=STOP_USER");
    .......
    }
    

    Kind regards
    Dembélé M

  • ' Gets an attribute xsi: type with XMLType object relational storage.

    Hello


    How to recover the attribute xsi: type, when you use storage relational XMLType object.

    When you have for example a ProductOrder object type and one object type MoveOrder what a CustomerOrder extensions type how to recover if the CustomerOrder is a kind of MoveOrder or ProductOrder attribute:

    < ns2:customerOrder xsi: type = "ns3:UpcProductOrder" >


    I would use the XMLTable service in combination with the XPath rewrite.

    version of the database 11.2.0.2

    Thanks for the details.

    As I said in my first answer, the prefix xsi is predefined, don't try to redeclare him.

    I know that sounds strange and is in contradiction with what the manual, but it seems to work that way with the storage of GOLD.

    http://docs.Oracle.com/CD/E11882_01/AppDev.112/e23094/xdb_xquery.htm#CBAJBDFA

    You can use these prefixes in XQuery expressions without first declaring in the prologue of the XQuery expression. You can redefine any of them except xml in the prologue.

    If documentation bug or implementation bug? I do not know.

    In any case:

    SQL> BEGIN
      2    DBMS_XMLSCHEMA.registerSchema(
      3      SCHEMAURL => 'test_otn.xsd',
      4      SCHEMADOC => bfilename('TEST_DIR','test_otn.xsd'),
      5      CSID => nls_charset_id('AL32UTF8')
      6    );
      7  END;
      8  /
    
    PL/SQL procedure successfully completed
    
    SQL>
    SQL> insert into cust_order values (xmltype
      2  ('
      3  
      6  a
      7  b
      8  '));
    
    1 row inserted
    
    SQL>
    SQL> SELECT order_id
      2       , order_item
      3       , order_type
      4  FROM cust_order
      5     , XMLTABLE (
      6         XMLNamespaces ('http://bla.com' as "ns1")
      7       , '/ns1:customerOrder'
      8         passing object_value
      9         columns order_id   varchar2(20) path 'ns1:orderId'
     10               , order_item varchar2(20) path 'ns1:orderItem'
     11               , order_type varchar2(30) path '@xsi:type'
     12       ) ;
    
    ORDER_ID             ORDER_ITEM           ORDER_TYPE
    -------------------- -------------------- ------------------------------
    a                    b                    http://bla.com:ProductOrder
     
    

    And if you do want the local name:

    SQL> SELECT order_id
      2       , order_item
      3       , order_type
      4  FROM cust_order
      5     , XMLTABLE (
      6         XMLNamespaces ('http://bla.com' as "ns1")
      7       , '/ns1:customerOrder'
      8         passing object_value
      9         columns order_id   varchar2(20) path 'ns1:orderId'
     10               , order_item varchar2(20) path 'ns1:orderItem'
     11               , order_type varchar2(30) path 'local-name-from-QName(@xsi:type)'
     12       ) ;
    
    ORDER_ID             ORDER_ITEM           ORDER_TYPE
    -------------------- -------------------- ------------------------------
    a                    b                    ProductOrder
     
    

    Hope that helps.

  • possible to find the size of a view


    Hi guys,.

    How do you guys normally find the size of the view?

    I had a situation here.

    DB_1 enjoys a view (created by selecting in tables via the union..)

    DB_2 has a procedure that will refresh a materialized view (select * from < the_table_from _db_1) @DB_1_database; )

    Question 1:

    How can I find the size of the view which is called DB_1. I don't think that if I can use dba_segments to find the size that I can't find a segment_type which is = 'DISPLAY '.

    Question2: the error below were reported by the team of apps.

    *

    ERROR on line 1:

    ORA-12008: error path refresh materialized view

    ORA-01652: unable to extend segment temp of 128 in tablespace TEMP

    ORA-02063: preceding line DB_1

    ORA-06512: at "SYS." DBMS_SNAPSHOT", line 2256

    ORA-06512: at "SYS." DBMS_SNAPSHOT", line 2462

    ORA-06512: at "SYS." DBMS_SNAPSHOT", line 2431

    ORA-06512: at "FWSS. < Procedures > r_", line 6

    ORA-06512: at line 1

    I tried to look for similair error on both of my database alert log but it could not be found. The above error must be charged on the alert logs.

    I saw many of the errors of the DB_1 alert log below.

    ORA-1652: unable to extend segment temp of 128 in tablespace TEMP

    So here's my question, getting the above error on DB_1 when DB_2 procedure call a refresh of its point of view of materliized which is to select the view via a link db DB_1?

    I suspect that the view is too large, which is at the origin of the temp will apear error.

    Hello

    Yes, the temporary tablespaces are generally used for the sort operation or join operations that cannot be handled in RAM and should use the disk (temporary file). as you say, your MV is on DB_2 and extracted data DB_1, where the sqls are merged and executed and according to the size of the data, the class union itself causes trained him in the use of the temp space and since you don't have enough room temp the ORA-01652 survey database

    for temporary tablespace all the sorting operations for instance share a single sort segment and this segment of the sort is assigned when the first statement ask the instance and can be communicated with the judgment. When the sort operation uses temp space extends the awarded are not automatically désallouées, however,

    those are mark them as free and will be available for later use.

    To your question, there could be a large operation that caused the tempfile to grows well in the database and once the operation is finished, the space

    is not automatically released, so in managed locally temporary tablespace, you can reduce the tablespace temporary for free those allocated unused space.

    In your situation you need not to shrink but to add tempfiles more.

    Kind regards

  • PowerCLI to find the host added in vcenter in the last 12 months

    Hello

    Can we use Powercli to find the host added in vcenter in the last 12 months

    Thank you

    The Get-VIEvent cmdlet and look for the HostAddedEvent.

    Get-VIEvent-beginning (Get-Date). AddYears(-1) - MaxSamples ([int]: MaxValue) |

    Where {$_-is [VMware.Vim.HostAddedEvent]}

    You can also use my Get-VIEventPlus function.

    Get-VIEventPlus-beginning (Get-Date). AddYears(-1) - EventType HostAddedEvent

  • New computer, need to Rebel XSI utility but can not find the CD

    Hi all

    We just got a new computer, an IMAC and I have an EOS Rebel XSI, I want to use with it.  Currently I use the camera with my laptop Mac under OSX Yosemite.  I can't find the CD that came with it (and doubt it would work anyway), so not sure how to get a beam compatible EOS Utility that will work with the camera and the computer.

    Is there a way to download this and is it available?  What utility EOS Rebel is compatible, if any?  I plan on implementing this new computer with the camera (if possible) the weekend of the new year.

    Thanks to all in advance, any help is highly appreciated.

    Go here and download the EOS Solution Disk file; This is a digital image of the CD.

    https://www.USA.Canon.com/Internet/portal/us/home/support/details/cameras/support-DSLR/EOS-Rebel-XSi...

  • Is there an easy way to find id attributes used as anchor points appointed?

    I want to create internal links to a number of places in my page. I use DW 2015 on Mac OS. My version of DW no longer has an Insert > named anchor works (probably because that HTML 5 is recommended to use the attributes id instead), but I can't find a way to find all my id attributes so I can quickly create these internal links. It seems that I should be able to find these easily.

    Incidentally (and I speak to the authors of the DW online help), the online help States still I should create anchors by adding > anchor named, which does not exist in my version (unless it was hidden, really, really well). Thanks in advance for any help, advice, etc.

    Some online help items are a bit outdated.  Named anchors are gone.  As far as I KNOW, there is no menu to quickly identify the IDs other than the use of Find (Ctrl / Cmd + F).

    Find: current document or all of the Local site folder.

    Search: Source Code

    "Find: id ="

    Touch search all.

    See the results in the results (F7) Panel

    Nancy O.

  • Find an attribute value Boolean inferred at a given date in the past

    Hello

    Need advice on below:

    Looking to find a value of the Boolean attribute to a given date in the past.

    Ex: [b1] condition A is true if

    age < 18 of the person and (the age is calculated using the date of the assessment [this is a basic attribute spent] year subtracted by year Date of birth of the person)

    the person has met the State B (may be that there is a finding of another rule that serves here as a condition which, in turn, uses the date of assessment)

    Looking to find if the [b1] was true at another date in the past. (for example a 6-7 month date before the date of delegated review)

    The function according to temporal but he explores always give the date [b1] value assessment and not the past date we want to find the value of.

    Thank you.

    In the example, the conclusion rule (condition A is true) will have a constant value (true or false) if there is no temporal logic feeding, i.e. no attributes with temporal values and no temporal function. However, if 'the person we met condition B' has changepoints, then it will be the conclusion.

    For example, if the value of ' the person met the condition B is initially 'false' and become 'true' to a point of change on 01/01/2014, then "condition A is true" will be set to 'false' at the start and 'true' 01/01/2014.

    Temporal data in the Debugger entry: http://docs.oracle.com/html/E48373_01/toc.htm#Debugging/Debug_temporal_rules_and_data.htm#Enter

    Temporal reasoning can be very powerful when used correctly, but most of the time it is exaggerated and made just the things more complicated than they should be. Most date calculations can be addressed with functions and logic of regular date.

  • How to find the physical hostname of the client used to connect to a linked view clone

    Our environment consists of Windows XP Professional workstations running the view client 4.0.  They are connecting to a connection manager view 4.0 that has a non-persistante linked server cloning pool, also the workstations XP Professional. We have two servers of connection manager, it allows direct connect.

    Is there a way to find the name of the physical device that they log in with?  I believe that when we use the Wyse terminals, the device name is passed to the NAME environment variable.  However when we use the view client, this value is set to "console" or "RDP - Tcp #1".

    I tried to test this with PCoIP and RDP, direct connection and pass through.

    Any ideas would be greatly appreciated.

    Thank you!

    What you will find, is the agent of view creates a number of user environment variables that give the details of the customer such as IP address, name and MAC address. What we have seen is that these variables are not necessarily available during logon, even if they are in 'HKCU\Volatile' If you want to take action based on an attribute of client device for things like mapping printers.

    Example of variables is:

    ViewClient_Broker_Remote_IP_Address=192.168.0.231
    ViewClient_Machine_Domain=appsense
    ViewClient_Machine_Name=APWAARC04
    ViewClient_MAC_Address=54-B3-80-DA-63-08
    ViewClient_Type=Windows
    

    --

    If you have found this device or any other answer useful please consider the use of buttons useful or Correct to award points.

  • How to find the security protocol used by a site in firefox to version 24.6.0

    I'm unable to find the security protocol used by the site, either SSL or TLS 1.0 or 1.2.

    I see my answer above is marked as useless, so I guess it doesn't help for Firefox 24.

    You should be able to see which version of the TLS Protocol and encryption to agree to the current use of press.
    You can use the above posted extension or check in the Security tab of the Web Console (Firefox/tools > Web Developer).
    24 Firefox supports only TLS 1.0 (security.tls.version.max = 1), so that only leaves you with Protocol to guess.

    In Firefox 24 you have the Security tab in "tools > Page Info > Security" to see what level of encryption is used, and you do not see what costume of encryption is used.
    To find you would have to disable any combination of encryption algorithm by setting the Pref security.ssls false and allow both until you get a secure connection.

  • Is there a way to find the IP address associated with a device that is currently using my Apple ID?

    Hi, is it possible to find the IP address associated with a device that is currently using my Apple ID? There is a device currently using my Apple ID, and I would like to know its IP address. When I connect to appleid.com, the device is listed. The device is an iPhone. It is an emergency situation. Thank you.

    Unless it's on your local network, the IP address won't be useful to you in any way. (and no, you can do that)

    If this is really an "emergency", inform the authorities.

  • How can I find the number of entries on a Web site when you use 'find '?

    I press Ctrl + F, the "Find" option appears. I type in a text, the 'Search' tab does not show the number of entries. For Firefox 25.0.1, is it possible to find the number of entries using 'find '? This is really essential.

    Thanks for your help!

    Can I afford too, for future versions of FF, the number of entries found in a web page by using the Find must be indicated.

    I'm sure that you need an add-on for that. Maybe:

    https://addons.Mozilla.org/en-us/Firefox/addon/findbar-tweak/

  • Want to know how to find the alias to a random file using applescript

    Hi, I was wondering if I can find the alias for any file that I even clicked on using applescript.

    I searched online, and there is not much that I can take some.

    So, for example in applescript I "put fileToFind to alias (...)" but this alias depends entirely on the single user, click on the file. So I do not know this alias exactly, is there a way that I can put this variable "fileToFind" to an appropriate alias of the file I even clicked on?

    single click

    Info (CMD + i)

Maybe you are looking for

  • Helps to remove the name of Troj/DocDl-Princeling

    cursor to the iMac began randomly blinking, not allowing the cursor to stay where I clicked and cycling through and menu bars.  I have installed sophos and it has detected a threat that he labeled as 'Troj/DocDl-AUL', sphos has not removed the threat

  • Pavilion #P7-1003W: replace # model HP Pavilion P7-1003W operating system XP Pro sp3?

    Hello, I am a newbie who is eager to see if anyone knows if I can load XP pro sp3 on this machine? I understand that it is a 64-bit computer that initially had the windows7 home premium? I do not want to load windows 7 again, that I prefer using wind

  • Invisible graph

    Hello I am developing an application in labview 8.2 and I have a display problem pour my graphs. Indeed, I have two graphs on the front (graph 1 and graph 2) who launch are all two visbles with their curve. I wish to make a single visible on both usi

  • How to add the full value of two buttons?

    How to add the full value of two buttons (any key) VI and display it in the output text box? I am attaching a sample program, but I know that his evil... Help, please

  • USB 3.0 adapter 663213-001.

    As for the web site of hp http://partsurfer.hp.com/ShowPhoto.aspx?partnumber=663213-001 I would like to know the use of the small adapter (male 9 pin/blue connector as pictured) is there any part number for this card? and you know if I can order this