Include all xmlattributes even if they are null values

Hello,
Is there a way to include all null xmlattributes even if they are null? I found one way by doing the following pasted code. But as you can see if you ahve a lot of attributes to do this fix in the code will get pretty ugly.
insertchildxml(
decode(nvl(activity_record.destination_id, 0), 0,
xmlelement("Destination",
xmlattributes(activity_record.dest_state as "state",
'' as "country",
activity_record.dest_splc as "SPLC",
activity_record.dest_city as "city")
xmlelement("Destination",
xmlattributes(activity_record.shipto_state as "state",
'' as "country",
null as "SPLC",
activity_record.shipto_city as "city")
'Destination[not(@SPLC)]',
'@SPLC',
NULL)

i do not fully understand that you want
but you may use cursor like follow
create table txmlgen as
select 1 id, 2 col from dual union all
select 2 id, null col from dual union all
select null id, 2 col from dual
DECLARE
  ctx     NUMBER; 
  xmldoc  CLOB;
  refcur  SYS_REFCURSOR;
BEGIN
  DBMS_LOB.createtemporary(xmldoc, TRUE);
  for rec in (select dummy d from dual)
  loop 
    OPEN refcur FOR 'SELECT id, col, :1 as d FROM txmlgen' USING rec.d;
    ctx := DBMS_XMLGEN.newContext(refcur);
    dbms_xmlgen.setRowSetTag(ctx, 'DummySet');
    DBMS_XMLGEN.setRowTag(ctx, 'Dummy');
    DBMS_XMLGEN.setNullHandling(ctx, dbms_xmlgen.EMPTY_TAG);
    DBMS_XMLGEN.getXML(ctx, xmldoc);
    DBMS_OUTPUT.put_line(xmldoc);
  end loop;
  DBMS_LOB.freetemporary(xmldoc);
  CLOSE refcur;
  DBMS_XMLGEN.closeContext(ctx);
END;
<?xml version="1.0"?>
<DummySet>
<Dummy>
  <ID>1</ID>
  <COL>2</COL>
  <D>X</D>
</Dummy>
<Dummy>
  <ID>2</ID>
  <COL/>
  <D>X</D>
</Dummy>
<Dummy>
  <ID/>
  <COL>2</COL>
  <D>X</D>
</Dummy>
</DummySet>

Similar Messages

  • My calculation "Total" box adds sum of all text fields whether they are visible or not, do I change

    I have check boxes that show and hide text fields. (Thanks to Gilads Java script). In options I have a default value for each text field.
    My "Total" Field field adds all fields even if they are not checked and visible. Need to have it only include them if they are checked and visible.

    You can't attach forms by email, or any other means, so it didn't come through.
    Since your fields have default values and aren't calculated based on the state of the corresponding check box, you will have to use a custom calculation script for the Total field that can check to see if any of the fields are hidden, and if so, don't include their values in the sum. For example:
    // Custom calculation script
    (function () {
        // Set up an array of field names to include in the total
        var aFields = ["text1", "text2", "text3", text4"];
        // Initialize variables
        var i, f, sum = 0;
        // Loop through the fields an calculate the sum
        for (i = 0; i < aFields.length; i += 1) {
            // Get the current field
            f = getField(aFields[i]);
            // Add the value of the current field to the sum if the field is visible
            if (f.display == display.visible) {
                sum += +f.value;
        // Set this field value to the sum
        event.value = sum;
    You can send me a PM if you want help offline.

  • Audio - toggle on/off multiple sounds even when they are not currently playing

    I am wondering if there is a way to stop toggle all sounds even if they are not playing.
    What I mean by that is I have several sound files that play one at a time when a slide comes in. I can toggle on/of the current sound but what if I want to toggle all sounds on/off in the compostion even if they are not playing so that when I go to next slide it will be on or off depending what was chosen on the previous slide?
    One of the problem would be that I do not want all sounds to be turned back on at the same time but only the current one but I still want to be able to turn off all the sounds if the user decides he does not want to hear sound while at the same time I want the sounds to load automatically on each slide if he has decided to have sound.
    Hope this makes sense.

    didn't have the time to test this code yet.
    but it should work.
    Html5 audio can not be accessed by class, it can only be accessed by id.
    so i made this code
    $( "audio" ).each(function() {
    var a = $(this).attr("id");
    var audioPlayer = document.getElementById(a)
        audioPlayer.pause();
        audioPlayer.currentTime = 0;
    this will find the id of the audios and pause them and reset the time to 0
    ( not really a way to officially stop audio )
    or you van just mute it with this code
    $( "audio" ).each(function() {
    var a = $(this).attr("id");
    var audioPlayer = document.getElementById(a)
        audioPlayer.muted = true;
    - Rob

  • TS3988 My wife bought an iPad Air and synced contact from our PC (Outlook), now all our contacts in Outlook have gone and we have to go to iCloud to get them, and even then they are a bit jumbled. How do I get my data back onto my PC?

    My wife bought an iPad Air and synced contact from our PC (Outlook), now all our contacts in Outlook have gone and we have to go to iCloud to get them, and even then they are a bit jumbled. How do I get my data back onto my PC?

    If you can see the iCloud contacts in Outlook, you can copy them back to your PC by selecting all the contacts (click one, then press Control-A), then drag and drop the selected contacts to Contacts under My Contacts on the left sidebar of Outlook.
    If you want to copy your calendar back to Outlook, select your iCloud calendar on the left sidebar of Outlook, switch to the list view (select View from the ribbon, then click Change View>List), select your events (click on a single event, then press Control-A), then control drag and drop them to Calendar under My Calendars on the left sidebar.
    Then you can sign out of iCloud on the iCloud control panel and your local copies will still be there.  If you want to add your iCloud email account back to iCloud, you can do this with these settings: http://support.apple.com/kb/HT4864.

  • My iPhone 5 has someone in Contacts that is not on my iPad or Mac even though they are all connected to my iCloud account how can I re-sycronise them?

    my iPhone 5 has someone in Contacts that is not on my iPad or Mac even though they are all connected to my iCloud account how can I re-sycronise them?

    Hello Mr Potatohead,
    Thank you for the details of the issue you are experiencing with your iCloud Contacts.  I recommend reviewing the sections titled "General troubleshooting," "Troubleshooting with iOS devices," and "Troubleshooting iCloud Contacts in Contacts on OS X Mountain Lion or later (or Address Book on OS X Lion)" in the following article for the issue you described:
    iCloud: Troubleshooting iCloud Contacts
    http://support.apple.com/kb/ts3998
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • Not all my songs are showing in itunes even though they are in the Itunes Media file directory

    Not all my songs are showing in itunes even though they are in the itunes Media Dir.  I have spent hours trying to find out why so I moved the songs out of the Music/itunes/itunes media and uninstalled itunes.  I then restarted my pc and re-installed itunes.  When I opened itunes the same songs are still there (but cannot be played as cannot find location) even though I have not put anything back in the itunes media dir.  To me there seems to be a refreshing problem as itunes is not looking at the directory even through the advanced preferences area is mapped to the correct area.
    Help please.
    Thanks

    Apple's official advice on duplicates is here: Find and remove duplicate items in your iTunes library. It is a manual process and the article fails to explain some of the potential pitfalls such as lost ratings and playlist membership, or that sometimes the same file can be represented by multiple entries in the library and that deleting one and recycling the file will break the other.
    Use Shift > View > Show Exact Duplicate Items to display duplicates as this is normally a more useful selection. You need to manually select all but one of each group to remove. Sorting the list by Date Added may make it easier to select the appropriate tracks, however this works best when performed immediately after the dupes have been created.  If you have multiple entries in iTunes connected to the same file on the hard drive then don't send to the recycle bin.
    Use my DeDuper script if you're not sure, don't want to do it by hand, or want to preserve ratings, play counts and playlist membership. See this thread for background, this post for detailed instructions, and please take note of the warning to backup your library before deduping.
    (If you don't see the menu bar press ALT to show it temporarily or CTRL+B to keep it displayed.)
    The most recent version of the script can tidy dead links as long as there is at least one live duplicate to merge stats and playlist membership to and should cope sensibly when the same file has been added via multiple paths.
    See also Make a split library portable for some thoughts on best practice when it comes to organizing the library and media files.
    tt2

  • I am having problems with my ipod syncing all of my videos to my ipod from my itunes playlist, it will only sync about half even though they are all checked

    i am having problems with my ipod syncing all of my videos to my ipod from my itunes playlist, it will only sync about half even though they are all checked

    I assume there is more than ample space remaining on your iPod to hold all the videos?  Are you getting any error messages during the sync process?
    Do all of these videos play okay in iTunes?  Is the sync only checked songs and videos option enabled from under the iPod's Summary tab?
    What other setting do you have enabled from under the iPod's video configuration tab in iTunes?
    B-rock

  • All my incoming calls are coming up as unknown, even though they are not blocked?

    All my incoming calls are coming up as unknown, even though they are not blocked? Any help much appreciated!

    We didnt    Still happens to some numbers!

  • HT204150 I have just set up icloud and all my contacts are duplicated from Address Book! My new iPhone is also showing duplicate contacts even though they are not duplicated in my address book on my computer. Please can you help

    I have just set up icloud and all my contacts are duplicated from Address Book! My new iPhone is also showing duplicate contacts even though they are not duplicated in my address book on my computer. Please can you help?

    Also, what are the source of your contacts? are they created on the phone, or you synced from yahoo/hotmail etc.
    If thats the case, the circular arrow wont be visible but instead show "groups"
    Contacts from different accounts are not synced to iCloud.

  • Why does Indesign say I have missing fonts even though they are in my packaged document?

    I use CS4 on my pc at work, and always package my files, as I have always done on my mac at home, to keep the links and fonts together so that when I send someone a folder, all of the fonts and images work.  For some reason, the packaged graphic designs (created on a mac) that are being sent to us from our graphic designer, all of my fonts are lost - even after having purchased the main one that we use - Gotham - to prevent this from happening.  This also occurs with any designs that I package and send out to others in our office.  I always have to relink the Gotham fonts, and I cannot retrieve the formatting for the fonts that we don't have, even though they are packaged. 
    We are considering purchasing a mac for me to use in the office, but I'd like to make sure that it is not user error before we proceed.
    Any ideas would be wonderful.  I never had this problem with my mac at home with packaging, and it has me confused and frustrated at work.
    Thanks!

    Since CS6 is the current release, upgrading to CS5 is a near impossibility, and EVERYONE will need to upgrade in lockstep or you'll be worse off than you are now with users of your newer version creating files that cannot be opened by users of CS4 (and your CS4 packages won't automatically install the fonts in the documents in the later versions without manually changing the names of the packaged fonts folders).
    As far as font formats, if you are going to collaborate cross-platform, the font of choice is OpenType, which is 100% cross-platform compatible, and second choice is Windows TrueType which also can be installed on Mac OS X (so, essentially, also cross-platform). Last choice would be to use Windows Type1 which can be installed in the private InDesign Fonts folder in the Mac applications folder and will work in ID, but nowhere else. Any of these would allow everyone to use the same fonts, presuming you all purchase the same versions. Purchasing Windows versions and Mac versions of the same font usually works, but there may be little surprises, and you probbly don't want that.

  • I made a movie in iMovie then deleted the clips in it. I have reimported the clips in an event with the same name as previously and some clips in the movie are still saying source slip missing even though they are there. What can I do?

    I made a movie in iMovie then deleted the clips in it. I have reimported the clips in an event with the same name as previously and some clips in the movie are still saying source slip missing even though they are there. Some clips are fine in the movie, but most are just black and when I hover over them, it says source clip missing. How to I fix this? Thank You

    I did that too, then I did a migration assistant to a new Mac and ALL of my movies have Source Clip Missing now, even though the original clips are still in the iPhoto Videos.  I can stand to re edit one or two projects, but not ALL.

  • How are the pWWN list populated in DCNM even before they are logged-in to the switch?

    Hello All
    DCNM v6.2.3
    I see that the hosts are not logged-in to the switch, however via DCNM when I try to create device alias I find the pWWNs populated which are not logged-in. How are the pWWN list populated in DCNM even before they are logged-in to the switch?
    Thanks
    Chetan

    This is definitely not happening automatically ? would be magic ! you can do it of course manually.

  • Why users are not able to see certain printers even though they are in the Airgroup server table

    Q: Why users are not able to see only certain printers even though they are in the Airgroup server table ?
    A: In certain scenarios  we may notice  printers come up under the server /cache entries on the controller.
    However when an airgroup user does search for printer, they may not see all the printers, certain printers may be not visible .
    This is because the service IDs sent by the user in the MDNS query are not broadcast by these printers 
    In the below capture the Ipad sends query for service id "_universal_sub_ipp_tcplocal" and "_universal_sub_ipps_tcplocal" and hence the controller will 
    respond with the printers that broadcasts these service ids.
    Non–Visible printer : 
    _printer._tcp.local                                                              PTR                         IN     7200  10.125.30.223  5820.05  Wed Mar 18 13:24:26 2015
    _pdl-datastream._tcp.local                                               PTR                         IN     7200  10.125.30.223  6112.25  Wed Mar 18 13:24:26 2015
    _ipp._tcp.local                                                                     PTR                         IN     7200  10.125.30.223  5888.15  Wed Mar 18 13:24:26 2015
    _http._tcp.local                                                                    PTR                         IN     7200  10.125.30.223  6293.88  Wed Mar 18 13:24:26 2015
    NPIED487E.local                                                                  A                             IN     240   10.125.30.223  194.43   Wed Mar 18 13:24:26 2015
    hp LaserJet 4250 [ED487E]._printer._tcp.local                     SRV/NBSTAT                  IN     240   10.125.30.223  209.87   Wed Mar 18 13:24:26 2015
    hp LaserJet 4250 [ED487E]._printer._tcp.local                     TXT                         IN     240   10.125.30.223  205.14   Wed Mar 18 13:24:26 2015
    hp LaserJet 4250 [ED487E]._printer._tcp.local                     TXT                         IN     240   10.125.30.223  197.18   Wed Mar 18 13:24:26 2015
    hp LaserJet 4250 [ED487E]._printer._tcp.local                     TXT                         IN     240   10.125.30.223  196.42   Wed Mar 18 13:24:26 2015
    hp LaserJet 4250 [ED487E]._printer._tcp.local                     TXT                         IN     240   10.125.30.223  208.15   Wed Mar 18 13:24:26 2015
    hp LaserJet 4250 [ED487E]._pdl-datastream._tcp.local              SRV/NBSTAT                  IN     240   10.125.30.223  207.35   Wed Mar 18 13:24:26 2015
    hp LaserJet 4250 [ED487E]._pdl-datastream._tcp.local              TXT                         IN     240   10.125.30.223  200.64   Wed Mar 18 13:24:26 2015
    hp LaserJet 4250 [ED487E]._ipp._tcp.local                         SRV/NBSTAT                  IN     240   10.125.30.223  209.44   Wed Mar 18 13:24:26 2015
    Visible-printer :
    _printer._tcp.local                                                                         PTR         IN     4500  10.125.26.29   3745.82  Wed Mar 18 13:24:51 2015
    _universal._sub._ipp._tcp.local                                                PTR         IN     4500  10.125.26.29   3694.14  Wed Mar 18 13:24:51 2015
    _ipp._tcp.local                                                                                PTR         IN     4500  10.125.26.29   3628.81  Wed Mar 18 13:24:51 2015
    _pdl-datastream._tcp.local                                                          PTR         IN     4500  10.125.26.29   3616.14  Wed Mar 18 13:24:51 2015
    _http._tcp.local                                                                              PTR         IN     4500  10.125.26.29   3793.56  Wed Mar 18 13:24:51 2015
    XRX9C934E25C52D.local                                                                A           IN     120   10.125.26.29   355.03   Wed Mar 18 13:24:51 2015
    Xerox WorkCentre 3615 (25:C5:2D)._printer._tcp.local         SRV/NBSTAT  IN     120   10.125.26.29   130.45   Wed Mar 18 13:24:51 2015
    Xerox WorkCentre 3615 (25:C5:2D)._printer._tcp.local         TXT         IN     4500  10.125.26.29   3670.33  Wed Mar 18 13:24:51 2015
    Xerox WorkCentre 3615 (25:C5:2D)._ipp._tcp.local             SRV/NBSTAT  IN     120   10.125.26.29   389.55   Wed Mar 18 13:24:51 2015
    Xerox WorkCentre 3615 (25:C5:2D)._ipp._tcp.local             TXT         IN     4500  10.125.26.29   3640.60  Wed Mar 18 13:24:51 2015
    Xerox WorkCentre 3615 (25:C5:2D)._pdl-datastream._tcp.local  SRV/NBSTAT  IN     120   10.125.26.29   210.97   Wed Mar 18 13:24:51 2015
    In order to learn other printers we may need to use specific app provided by printer vendor on the client or configure the printers to send these service IDs.

    The net 451 issues made it not work after a while but it affected the entire RWW site not just remote access:
    http://blogs.technet.com/b/sbs/archive/2014/01/13/troubleshooting-an-unexpected-error-occurred-message-when-using-remote-web-access-to-connect-to-computers.aspx
    Careful if you try and uninstall it, you'll need to put back net 4.0 and reconfigure some stuff.
    Did it ever work?  
    Make sure the users have installed the certificate they need and turn on compatibility mode in IE (also make sure IE isn't locked down and disabling activeX).:
    https://technet.microsoft.com/en-us/library/dd701173%28v=ws.10%29.aspx?f=255&MSPPError=-2147217396
    -- Al

  • Why is it that some songs get listed on their own even though they are part of an album?

    Why is it that some songs get listed on their own even though they are part of an album? They are always songs that I had on my computer not imported from a cd using iTunes. I have verified that all the info is correct and matches the other songs in the album. Sometimes I can check the "compilation" box on all the songs in the album and that will put them in order and in the same listing. I'm pulling my hair out trying to figure this out.

    Good One CL.
    What I did in this case is select all the songs in the album and select Get Info and see if  Album Artist and Album and Sort Artist and Sort Album Artist and Sort Album are the same.

  • Can we recharge iPhones several times a day even when they are in 50%

    Dear all,
    Can we recharge iPhones several times a day even when they are in 50%?
    Is it OK, if we leave iPhone plugged-in even when it is fully charged? I have heard that, we need to discharge battery completely at least once a month to improve the battery life. Is that right?
    Thanks

    Dear Farhad,
    there is definitely two schools of thought about this, the conventional one is use phone until almost dead then full charge, however recent articles in macworld that frequent charges do no more harm to these batteries. i think the best advice is to use your phone and then charge it when it needs charging. Most phone batteries ae fairly tired after a couple of years anyway, regardless of how to charge.
    bw
    Andrew

Maybe you are looking for

  • HTML video works but not when publishing in MUSE

    I threw this together without using MUSE - Just a test video that I made in Dreamweaver.  The reason why I'm posting this in MUSE as well as DW forum is because maybe I'm not doing the "5" code correctly.  anyway --: http://designerandpublisher.com/h

  • Powershell SMO connecting to specific server's Dedicated Administrative Connection

    Very simple code is attempting to connect to DAC on one specific server: $InstanceObject = New-Object ('Microsoft.SqlServer.Management.Smo.Server') -argumentlist $InstanceName $FullVersionNumber = $InstanceObject.information.VersionString This works

  • How could I delete the physical files associated with songs that iTunes has matched to iCloud Match?

    I would like to make room on my external drive. I need to be able to delete the songs that are matched in iTunes. Using the delete right-click option does remove the entry form the itunes Directory but NOT the physical files. I have my iTunes Library

  • How to hide Text Variable in the Query title

    Hi guys, here again in a very easy pratical issue. I need to insert a text variable in a report title. The variable is updated with an exit and the text is get once the query is executed. This works fine. My problem is that in report selection (so op

  • XpauseTarget minimum value

    I noticed that in the documentation for jrockit real time 4.0 eval version, the minimum pause target is 10ms. Can this be set lower if I have a license for the product? If so, what is the minimum value for licensed versions of the product? Thanks.