XMLNS attribute in the tag wrong

Hello!

This XML has been accepted with the xmlns attribute in the wrong tag, but I have to extract its value in any way. How can I do?
  <NFe>
    <infNFe Id="NFe123" versao="2.00" xmlns="http://www.portalfiscal.inf.br/nfe">
    <ide>
      <cUF>00</cUF>
    </ide>
  </infNFe>
</NFe>
Thank you!
Luciana

You will need to write it as one 'or' but it will be much less efficeint except if you process documents one at a time

SQL> with MY_XML_SAMPLE  as
  2  (
  3    select XMLTYPE('
  4  
  5      
  6      
  7        00
  8      
  9    
 10  ') as OBJECT_VALUE from dual
 11  )
 12  select t.*
 13    from MY_XML_SAMPLE,
 14         XMLTable
 15         (
 16            xmlnamespaces
 17            (
 18              'http://www.portalfiscal.inf.br/nfe' as "nfe"
 19            ),
 20            '/NFe/nfe:infNFe | /nfe:NFe/nfe:infNFe'
 21            passing OBJECT_VALUE
 22            columns
 23            ID      VARCHAR2(32)   path '@Id',
 24            VERSION NUMBER         path '@versao',
 25            CUF     VARCHAR2(2)    path 'nfe:ide/nfe:cUF'
 26         ) t
 27  /

ID                                  VERSION CU
-------------------------------- ---------- --
NFe123                                    2 00

SQL> with MY_XML_SAMPLE  as
  2  (
  3    select XMLTYPE('
  4  
  5      
  6      
  7        00
  8      
  9    
 10  ') as OBJECT_VALUE from dual
 11  )
 12  select t.*
 13    from MY_XML_SAMPLE,
 14         XMLTable
 15         (
 16            xmlnamespaces
 17            (
 18              'http://www.portalfiscal.inf.br/nfe' as "nfe"
 19            ),
 20            '/NFe/nfe:infNFe | /nfe:NFe/nfe:infNFe'
 21            passing OBJECT_VALUE
 22            columns
 23            ID      VARCHAR2(32)   path '@Id',
 24            VERSION NUMBER         path '@versao',
 25            CUF     VARCHAR2(2)    path 'nfe:ide/nfe:cUF'
 26         ) t
 27  /

ID                                  VERSION CU
-------------------------------- ---------- --
NFe123                                    2 00

SQL>

Just checked that it works in 10.2.0.4.0 so

Published by: mdrake on December 3, 2010 08:02

Tags: Database

Similar Questions

  • ColdFusion files downloaded with several attribute in the tag input processing

    Hello, all,.

    (For the first time), I try a function which will be posted via HTML5 form from one code files < input type = "file" multiple = "multiple" name = "images" / > tag.

    Specifically, how do I determine how many files have been selected for download on the side Server?

    The goal is to use CFFILE to READASBINARY the images, and then insert that the directly into a MySQL database.  (That last part, I think I have down pat.)

    V/r,

    ^_^

    OK... It's CF10, so I don't have the luxury of form definition to present several elements (such as check boxes, boxes option or others who submit a list separated by commas of data) in a table instead of a list... However...

    What I've discovered, is that file multiple entry shall submit a list separated by commas of the files.

    So what I learned is that if the form is present, use REMatchNoCase() on form.fieldnames looking for the name of the input file element and the length of the array will be the number of downloaded files.

    
        
        
        There are #arrayLen(results)# files being uploaded.
    
    

    The downside of this VERY simplistic code is that the form element exists even if no file is selected, it will always display at least one.  Adding validation to make sure that one has the other thing that an empty value would be a good idea. but for brevity, I'm not add that here.

    HTH,

    ^_^

  • Retrieve the Name of the tag property

    I'm definitely a novice PowerCLI. However, I have a script which is heavily borrowed from http://www.vstrong.info/2013/10/18/vmware-powercli-script-to-query-virtual-machine-events/

    What I would like to make in addition to the values that are retrieved, also receive the Name property of the attribute of the tag.

    The script I use now is:

    $vcenterserver = "myvcenter".

    # Check if VMware Snapin is loaded, otherwise, load

    If ((Get - PSSnapin - name VMware.VimAutomation.Core - ErrorAction SilentlyContinue) - eq $null)

    {

    Add-PSSnapin VMware.VimAutomation.Core

    }

    SE connect-VIServer-Server $vcenterserver

    $CDT = get-Date

    Get-VM-name testvm | »

    Get-VIEvent-Types of information - start $CDT. AddDays(-30)-finishing $CDT | »

    Where {'}

    $_. GetType(). Name - eq "VmBeingDeployedEvent" "

    - or $_. GetType(). Name - eq "VmCreatedEvent" "

    - or $_. GetType(). Name - eq "VmRegisteredEvent"} | »

    Select the name of user, Createduserid, FullFormattedMessage, @{Name = "VM"; Expression = {$_.} Vm.Name}}, @{Name = "RC Code"; Expression = {$_.} Vm.Tag}}

    He retrieves the correct values with the exception of the tag for the virtual machine. I also tried @{Name = "RC Code"; Expression = {$_.} Vm.Tag.Name}}

    I can extract the value in a table using the following command, but can't seem to pull the Name property:

    Get-VM-name testvm | Get-TagAssignment-category RCCode | Select-Object - ExpandProperty tag

    Description of the categories of name

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

    10031 technical RCCode except...

    Any help would be appreciated, thanks!

    OK, then try this. I have not yet tested, but it should do it for you:

    Select the name of user, Createduserid, FullFormattedMessage, @{Name = "VM"; Expression = {$_.} Vm.Name}}, @{Name = "RC Code"; Expression = {$vm = ($_.)} UMM name); Get-TagAssignment | where {$_.} Entity-like ("$VM")}}} | Export Csv c:\Temp\csv.csv - NoTypeInformation - UseCulture

    The issue was that as the expression of Code RC worked essentially a new request, the $_. UMM name was irrelevant for the entity. Instead I just had the previous $_. UMM name in a variable that is referenced in the cmdlet that followed. Let me know if it works for you.

  • Netscape and Mozilla do not recognize the tags

    Hi, I do an image map and drew contact information using links and fancy ToolTips and it works fine in MSIE but ToolTips do not show up in Netscape 8.0 or Mozilla 1.0.6. Dreamweaver is telling me "the title attribute of the tag BOX is not supported in Netscape 4 & 6". Anyone know what the alternative is so it does not work on all browsers? Thanks in advance!

    Holly

    Thank you. I got help from the list of Overlib and it worked very well.

  • Parsing XML and get the attributes of a tag

    Hello

    When parsing XML for application of Cascades in C++, I am able to get the value of a tag as follows:

    00000

    But I also want to get the attributes of a tag:

    But I don't know how to get the 'CA' and 'California' attributes with my current code.  Can anyone help?  Here is the code I use to parse the XML code:

    void CMController::requestFinished(QNetworkReply* reply) {
    
        if (reply->error() == QNetworkReply::NoError) {
    
            QXmlStreamReader xml;
    
            QByteArray data = reply->readAll();
            xml.addData(data);
    
            QString zip;
            QString id;
            QString location;
    
            while (!xml.atEnd() && !xml.hasError()) {
    
                /* Read next element.*/
                QXmlStreamReader::TokenType token = xml.readNext();
    
                /* If token is just StartDocument, we'll go to next.*/
                if (token == QXmlStreamReader::StartDocument) {
                    continue;
                }
    
                /* If token is StartElement, we'll see if we can read it.*/
                if (token == QXmlStreamReader::StartElement) {
    
                    if (xml.name() == "zip") {
                        zip = xml.readElementText();
                    }
    
                    if (xml.name() == "id") {
                        ???
                    }
    
                    if (xml.name() == "location") {
                        ???
                    }
    
                }
    
            }
    
            emit succeeded(result);
    
        } else {
            emit failed();
        }
    
        reply->deleteLater();
    
    }
    

    Thank you!

    I found a working example:

    if(xml.name() == "state"){
        QXmlStreamAttributes attrib = xml.attributes();
        QStringRef ref = attrib.value("location");
        qDebug() << "location: " << ref;
    }
    
  • Simulator Device.xml file has a tag with an attribute of memory, what are the optional values for this attribute of the os?

    In the Device.xml file, it starts with the tags of the os. Each os has a memory attribute. What are the optional values for the attribute memory?

    Can we really control the memory for the simulators?

    0x85000F03
    0x8C000F03
    0x87000F03
    0x84001503
    0x86001503
    0x04001507
    0x0F001507
    0x0C001404
    0x0D001404
    0x0E001404
    0x0D000D04
    0x16000D04
    0x05001504
    0x07001504
    

    These values refer to specific hardware configurations are simulated.  They should not be changed.

  • Add several attribute of a tag in the xml file

    Hello

    I have a donnees_xml in the xml_test_table of the table in the format

    <? XML version = "1.0"? >
    rowset <>
    < ROW >
    < CLASS > XII has < / CLASS >
    KATE < TEACHER > < / TEACHER >
    < STUDENT_STRENGTH > 30 < / STUDENT_STRENGTH >
    < 50 OFFICES > < / DESKS >
    < / ROW >
    < ROW >
    B XII < CLASS > < / CLASS >
    < STUDENT_STRENGTH > 40 < / STUDENT_STRENGTH >
    < NUMBER OF GIRLS 15 > < / NUMBER OF GIRLS >
    < NUMBER_OF_BOYS > 25 < / NUMBER_OF_BOYS >
    < / ROW >
    < / LINES >

    I need to change the xml in this format:

    <? XML version = "1.0"? >
    rowset <>
    < ROW >
    < CLASS > XII has < / CLASS >
    < age TEACHER subject = "37" = "Math" > KATE < / TEACHER >
    < STUDENT_STRENGTH > 30 < / STUDENT_STRENGTH >
    < 50 OFFICES > < / DESKS >
    < / ROW >
    < ROW >
    B XII < CLASS > < / CLASS >
    < STUDENT_STRENGTH > 40 < / STUDENT_STRENGTH >
    < NUMBER OF GIRLS 15 > < / NUMBER OF GIRLS >
    < NUMBER_OF_BOYS > 25 < / NUMBER_OF_BOYS >
    < / ROW >
    < / LINES >

    You will need to add several attribute to all the 'teacher' in the XML tag.
    I am able to add a single using attribute

    Select insertChildXML (donnees_xml, 'game of LINES/LINES/TEACHER', '@age', ' 37 ") of test_xml_table;

    Thanks in advance

    In this scenario, we have a simple find and replace the XML function using which i can replace the tag with (I understand this is not good was to solve this).

    Why not use two calls separate insertChildXML?
    The premiera adds the attribute to @age, and the other adds the attribute @subject on the result of the first.

  • 'Value not completed for attribute "in the XML tag". (SBL-UIF-00265) »

    To get this message when I change a Web layout for a display in Siebel tools 7.8.2 "unfinished value for the attribute"in the XML tag". (SBL-UIF-00265) «... Anyone has an idea why I get this message?

    Hello

    Check the webtemplate to view file. The WT file may contain a double quote in some tags. Maybe it's the cause of the error. U have changed the SWT file by accident. Refer to ID 1280569.1 Web of Support of Oracle for more information.

    Kind regards
    Joseph

  • Validation of attribute of the CFQUERY tag error

    I have a CF app that works well on a shared hosting. I have now a VPS running the version of CF 9. When I try to use it on the VPS, I get the following error:

    Validation of attribute of the CFQUERY tag error.

    The value of the datasource attribute, which is currently ", is not valid.

    The data source is defined in application.cfc and again works very well in the shared environment.

    The only differences is the shared is running on Windows, and the VPS is Linux. In addition, Windows running the 9,0,1,274733 version and Linux is 9,0,0,251028

    Any help would be greatly appreciated.

    If the file in question is really called "application.cfc" then that's your problem.  This is supposed to be 'Application.cfc '.

    --

    Adam

  • The tag library: adding an attribute to a tag that is defined elsewhere

    The tag library contains a number of attributes specific spry to the form tag. For example, when I type a form in source view tag, the AutoComplete window includes "spry: choose" "spry: content," etc. I would like to do something similar, adding my own attribute to the form tag. Unfortunately, I can't understand how the spry attributes are added to the definition of the form tag. They don't seem to be in TagLibraries/HTML/Form.vtm as I expect.

    Thanks for your help.

    I thought about it. Under the Configuration/TagLibraries, create a CrossTagAttr folder and paste in it .vtm file. In the .vtm file, use the tag and its children. For an example, see Configuration/TagLibraries/CrossTagAttr/Spry/Spry.vtm.

  • How to read the tag bluetooth data in labview 2015 running on Windows 10

    Hi all

    I have a Development Board Nordic semiconductor nr51. This card is programmed as a tag bluetooth which simply announces his address with 16 bits of data appended to the end.

    My laptop came with loan materials smart bluetooth. I installed an app interactor lighthouse to bluetooth on my laptop and the software is able to detect the tag as if shown on the image below.

    I wanted to write a LabVIEW program that will simply be careful bluetooth headlights and notify me in my computer every time a lighthouse with the specified address is detected. This mobile application below is provided by the manufactuerer of the Board of Directors and I wanted to develop a LabVIEW program something similar to what will read the given data and extract values.

    Somehow, all the sample applications provided data only shows how to read and write in a connected bletooth device but not analysis for tags. I also tried using the Bluetooth ' discover ' and it does not detect the bluetooth beacons.

    Could someone provide me with the necessary information or example program for detecting / reading of tags bluetooth in LabVIEW 2015 running on Windows 10?

    Do I need to install a third-party software to read data from bluetooth?

    Bluetooth in LabVIEW function nodes using the Winsock interface to access bluetooth resources. This works very well for Bluetooth 2.0 devices but not Bluetooth 4.0 devices WHEAT aka. Microsoft has created a completely different interface for these resources API as the model of overall service for WHEAT devices has radically changed.

    The API to use WHEAT devices is the API of the GATT (generic attribute profile) in Windows. There is supposedly a .net interface available that you can try to use (Windows.Devices.Bluetooth.GenericAttributeProfile). The WinAPI to lower level (https://msdn.microsoft.com/en-us/library/windows/hardware/hh450825(v=vs.85).aspx) is a C DLL API and does not lend at all to be called directly by the LabVIEW call library node, since some of the parameters of the function are quite complicated and you need to also access the SetupDI APIs to enumerate resources WHEAT and even harder to function parameters. In order to access this low-level API to write an intermediate DLL which results in low level API C a more acceptable API for LabVIEW.

    Another possible problem is that Windows don't at least in Windows 8 not allows devices to pair per program. Microsoft wanted to force developers in the use of the "inbox" experience, which means that all users must go through Microsoft provided service pairing, instead of each request for implementation of his own matching technique.

  • Problems to change the attributes of the song

    I like having all my podcasts in a list in order to put in order and interlacing different podcasts.  To do this, I changed the album on all podcasts "PodcastList" and change the track numbers so they sort in the order I want.  (I actually did a script in MediaMonkey to do that for me automatically).

    All this worked fine until I added an SD card and has started to keep my podcasts on it.  By mistake, I synced my list in MediaMonkey before that I had changed everything to be in the "PodcastList" album, so now some of my podcasts appear in different lists in the "rocket".  Now I've tried everything I can think to change the album on these podcasts, but it seems whatever I do that the "rocket" seems to remember the original name of the album.

    I manually changed the name of the album on some of these podcasts in MediaMonkey, located on the device (no synchronization involved this time), but when I unplug my Fuze, let him do the thing "Refreshing your media", then plug it back in MediaMonkey, I find that the name of the album was changed to the rear.

    I think that the database of the rocket is cached information.  Even if I delete the files of the "rocket", let 'refresh my media', then put the files they receive in return the original album.  The only thing that I found that can get the "rocket" to "forget" this info is to change the names of files (not the title of the track, the name of the file).

    Is there an easier way to clear the cache of the rocket for some songs, far from doing a reformat of this?  It will take me some time to rename all these files.

    I finally understood what went wrong.  It wasn't the "rocket" that had the problem, it was the way that I was updating my files in MediaMonkey.

    I wrote a script to MediaMonkey in order to Auto-re - number all my podcasts.  It turns out that while I was updating the file information in the database I was not updated on the real files.  For some reason any MediaMonkey synced those files on the SD card in the "rocket" it took the tags on the files, not the tags in the database (although when I sync to the internal memory of the rocket, it was not a problem).  I added a line at the end of my script, re-run on my files, and then removed all of the "rocket" and re-synchronized it.  After that, it seems to work.

    For someone else in the same situation, it's the line that I had to add:

    ITM. WriteTags

    I already had this, but it does not seem to be sufficient when a SD card took part:

    ITM. UpdateDB

    Now, I have both, and it works great so far.

  • View 32GB does not correctly recognize the tags

    I've converted all my tags to ID3v2.3 ISO-8859-1 and my opinion always puts a lot of songs in the unknown section. I'm very meticulous about my ID3 tags, so I try to have each perfect song. I also tried to update the tags I've noticed where wrong on the device, and I was able to fix, but the drive still shows the old (incorrect) information. I tried to delete the \\SYSTEM\DATA folder and it has updated its database, but the old tags are always displayed. I have the new firmware and I am running XP SP2. I used D & D to get the files on my player.

    Another problem, I've had, it's my player no longer whenever I try to transfer some songs to it. It freezes on the same songs every time. I found a work around that, but it forces me to use another computer running Vista. When I use another computer each song transfers very well with do not freeze. Also, I own an e270 and have the same music on it. [transferred from my XP machine very well and plays very well backwards]

    Any help?

    The view should update its database. Trying to transfer a dozen songs off the coast, then turn on again. Allow the player to refresh. Could not turn off the player when his updating of its database.

  • Recreate the attributes of the My Music folder

    Hi guys

    I tried to move the location of 'My music' in order to free up space on the c drive, but it was wrong and the file left in the user account is damaged. I created a new folder but it doesn't have the attributes of the my previous music folder. I thought of a restoration, but the only point is well before I did a lot of independent work on the system, so this isn't a realistic option.

    Can someone tell me how I can put in place a new folder my music with the correct attributes?

    Hi Graham,

    Sorry for the delay in my response.

    Restore music library to its default values and then try to redirect the music library to another location.

    a. open Windows Explorer. Under libraries.
    b. right-click on the corresponding library (Music), and then choose Remove.
    c. click Yes when asked for confirmation.
    Note: Deleting a library does not remove the content of the included files. However, you need to add or include your folders manually, if necessary.
    Include folders in a library:
    http://Windows.Microsoft.com/en-us/Windows7/include-folders-in-a-library
    d. then, in the Windows Explorer navigation pane, click libraries and click on restore default libraries.
    e. that recreates the library that you just removed.
    f. this option only restores the default libraries supplied with Windows 7.

    Also refer to this:

    Redirect a folder to a new location

    http://Windows.Microsoft.com/en-in/Windows/redirect-folder-new-location#1TC=Windows-7

  • Unknown or unexpected element or attribute in the application... (application.iPhone is an unexpected/attribute - SOS! SOS!

    I'm trying to package an ipa file and I get the following error:

    unexpectedAttributes-iphone.PNG

    My development environment: Win10, Flash CC 2015, Air 19.0.0.241. I also use the notifications Push DONKEY from milkman games. I'm using a production certificate and provisioning profile. In the end, I want to test the application on iOS in TestFlight.

    I had some suggested, but it did not work. I tried different things, with new errors. (Daniel Albu - Albu Interactive Labs)

    I also went through the Air application descriptor elements Documentation but I didn't understand.

    I need help!

    Here is the code:

    <? XML version = "1.0" encoding = "utf-8" standalone = 'no '? >

    <!--

    Use:

    To locate the description, use the following format for the description element.

    < description >

    < text XML: lang = "fr" > App English description goes here < / text >

    < text XML: lang = "fr" > French App description goes here < / text >

    < text XML: lang = "ja" > Japanese App description goes here < / text >

    < / description >

    To locate the name, use the following format for the name element.

    < name >

    < text XML: lang = "fr" > insert here the App English name < / text >

    < text XML: lang = "fr" > insert here the French App name < / text >

    < text XML: lang = "ja" > insert here the Japanese App name < / text >

    < / name >

    ->

    " < application xmlns =" http://ns.Adobe.com/air/application/19.0 ">

    com.MyApp.app < id > < /ID >

    < versionNumber > 1.2.1 < / versionNumber >

    < file_name > MyAppName < / name of the file >

    < description / >

    < name > MyAppName < / name >

    < initialWindow >

    < content > MyApp.swf < / content >

    standard < systemChrome > < / systemChrome >

    < clear > false < / transparent >

    < visible > true < / visible >

    true < fullscreen > < / full screen >

    landscape of < aspectRatio > < / aspectRatio >

    direct < renderMode > < / renderMode >

    < autoOrients > true < / autoOrients > < / initialWindow >

    <>icon

    Icons/ah_29.png < image29x29 > < / image29x29 >

    Icons/ah_57.png < image57x57 > < / image57x57 >

    Icons/ah_114.png < image114x114 > < / image114x114 >

    Icons/ah_512.png < image512x512 > < / image512x512 >

    Icons/ah_48.png < image48x48 > < / image48x48 >

    Icons/ah_72.png < image72x72 > < / image72x72 >

    Icons/ah_50.png < image50x50 > < / image50x50 >

    Icons/ah_58.png < image58x58 > < / image58x58 >

    Icons/ah_100.png < image100x100 > < / image100x100 >

    Icons/ah_144.png < image144x144 > < / image144x144 >

    Icons/ah_1024.png < image1024x1024 > < / image1024x1024 >

    Icons/ah_40.png < image40x40 > < / image40x40 >

    Icons/ah_76.png < image76x76 > < / image76x76 >

    Icons/ah_80.png < image80x80 > < / image80x80 >

    Icons/ah_120.png < image120x120 > < / image120x120 >

    Icons/ah_152.png < image152x152 > < / image152x152 >

    < / icon >

    < customUpdateUI > false < / customUpdateUI >

    < allowBrowserInvocation > false < / allowBrowserInvocation >

    < supportedLanguages > en < / supportedLanguages >

    < iPhone >

    < rights >

    <! [CDATA]

    < key > application identifier < / key >

    < string > 000000000.com.myapp.app < / string >

    aps-environment < key > < / key >

    production of < string > < / string >

    < key > beta-reports-active < / key >

    < true / >

    < key > Keychain-Access-groups < / key >

    < table >

    < string > 000000000.com.myapp.app < / string >

    < / array >

    []] >

    < / rights >

    standard of < requestedDisplayResolution > < / requestedDisplayResolution >

    < / iPhone >

    < iPhone >

    < InfoAdditions > <! [CDATA]

    < key > UIDeviceFamily < / key >

    < table >

    < string > 1 < / string >

    < string > 2 < / string >

    < / array >

    []] > < / InfoAdditions >

    < / iPhone >

    <>Extensions

    < extensionID > com.milkmangames.extensions.EasyPush < / extensionID >

    < / extensions >

    < / application >

    You have two sets of "iPhone" in there. Move the infoadditions to the second iPhone tags in the tags first iPhone.

Maybe you are looking for

  • Search finds messages, but how do I know if the message is located in the folder?

    New to TB of Eudora. I love TB. Play with the search, both using the box in TB and Windows Search. Anyway, I get results - slightly different, but which are correct. But using both methods, when I found the message that interests me, I can't determin

  • Qosmio F50 - replacing the fan 12L

    Hello I have problems with my laptop. I had some problems with my fan, and I have to replace it. I contacted the support by Toshiba repair centers on the Greece on the replacement, and they said that they do not have a replacement. I want to know wha

  • Satellite A300-276 - requires BIOS password

    Hello, recently I have acquired a Satellite A300-276 with insydeh2o BIOS. The BIOS Setup asks for password to access. I tried some stuff, like shorthing b500 (it clears cmos, but it does not remove the password). Also updated the version of the bios

  • Do not sync calendars

    I have a MacBook, iphone and icloud calendars. Both devices connect to icloud, but calendars sync between devices or in icloud. They used to, using a USB cord and itunes.  I add content to ical on my computer and then on the iphone, but the content d

  • IHost process for Windows Services has stopped working

    I get the following message if displayed in a window pop up on my screen. "Host process for Windows Services has stopped working. A problem caused the blocking of the program works correctly. Windows will close the program and notify you if a solutio