File associations trouble in XFCE after removing Gnome

Hi all,
I recently decided to switch to XFCE, totally replacing my previous Gnome DE, I removed gnome and all associated dependencies using "sudo pacman -Rscn gnome" then configured my new XFCE desktop to my liking, problem is that now some file associations are messed up, for example, If im on chromium and download a file, clicking "show in folder" opens up firefox instead of thunar, there were other problems, but I got them fixed by removing the contents on the folder ~/.local/share/applications/ that was filled with a lot of wine apps and some weird stuff.
Now the only thing missing is this firefox thing, no idea how to fix it, please help, also I tried removing firefox but "show in folder" doesnt do anything.
regards and thanks in advance for the help

I did read it but that didnt help, in the end what worked was regenerating the database and restarting comp. Also Xfce is a DE as the article states. Sí this behaviour wasn't normal.
Thanks a lot for the help provided

Similar Messages

  • File associations in Bridge CC after updating to CC 2014

    I am facing a problem with the file association settings in Bridge CC after having updated my other creative suite programs to version CC 2014.
    In previous version I had the option when opening eg. PDF file to chose "open with", and then chose Illustrator or Photoshop. This option is no longer available. When using the Preference menu under file association I can only change the default settings to be either Acrobat or for some reason Firefox. When browsing for Illustrator or Photoshop and choosing the program the PDF file will only open in Illustrator or Photoshop as default not Acrobat as it is suppose to. Does anybody have a solution to this problem.

    Thank you for the answer, but is doesn't fix the problem. The explorer settings lets me open pdf files in Acrobat, Illustrator or Photoshop.
    The problem is that Bridge doesn't allow me to open pdf files in Illustrator.
    When trying to solve the problem by altering the file type association settings, browsing and choosing Illustrator CC 2014, the pdf files will then open by default in Illustrator, and this is not what i want. I want the option to chose, open with Illustrator, and still have Acrobat as the default program. 
    Anybody know how to fix this?

  • Changing file associations doesn't work after CS4 install

    I am running into an issue on any machine I install CS4 on in which I would like (for the time being) to keep CS2 or CS3 on whereby the Open with in get info always defaults to the particular CS4 app, no matter if I set it to CS2/CS3 and hit change all. You can do an individual file and set the .indd file to open in ID CS2, but if you try to force a change all to default any .indd file to open with ID CS2, it reverts automatically back to ID CS4.
    I have tried this on various workstations with differing OS's, Tiger, Leopard, and all yield the same result. It is like no matter what you do all the CS4 apps have precedence for whatever reason and cannot be universally overridden. Any ideas or others that have run into this?
    I have use Onyx to clean up the Launchservice databases and to clean up associations, have thrown out some plists, etc. and nothing is working.
    Any help would be appreciated.
    Brian

    Thanks, Bob. I will take a look at, but it might not be exactly what I was hoping for as I was hoping to avoid the user from having to drag files onto something just to open them up.
    Any ideas why CS4 overrides the ability to globally set the Open with to CS2 or CS3 but you still can on just one document?
    Odd behavior.
    Brian

  • For questions about your desktop icons and all file associations changing to itunes after install, follow this link.

    SUCCESS!
    I had the same problem and this is what helped me to fix the problem.  It is a computer problem in your registry.  Here's the link to the post that helped me. Good Luck!
    http://www.sevenforums.com/tutorials/19449-default-file-type-associations-restor e.html .   This link helped in fixing the problem.  Just follow the instructions.

    Drew
    The specific link for Apple Remote Desktop is here:
    http://discussions.apple.com/forum.jspa?forumID=1007
    This is the link for all the Forums. Apple Remote Desktop is in the Server Section at the bottom of the 2nd Column:
    http://discussions.apple.com/index.jspa
    You can't install Snow Leopard Remotely. Think about it.
    What you could do - and assuming you have OSX Server - is install 10.6 on one mac, get it fully up to date, install the remaining applications - assuming site licenses - use the System Image Utility on the Server (or a Client with the application installed) to create a NetBoot Image of that built workstation. Image the rest using OSX Server's NetBoot Service. I've done numerous site installations using OSX Server and NetBoot (60 and more individual workstations) in a day or two depending on the Software installed.
    Not surprisingly there is a dedicated forum for this also:
    http://discussions.apple.com/category.jspa?categoryID=96
    +" . . . is this a tool that would help obtain our goals quicker that installing all the software on each computer individually."+
    Apart from the initial OS install - Yes. You can install incremental OS Updates using ARD easily and quickly. Again if you have OSX Server you can utilise it's Software Update Service to achieve the same thing quickly and easily.
    If you don't have OSX Server you can by all means do this the way you're saying. You don't even need to use SuperDuper - why pay for something that can be done for free with what's already supplied? All you need is a firewire cable, target disk mode and the Restore option in Disk Utility. The more firewire cables you have the sooner you'll get it done.
    It does not really matter what you're using for your Network although a Time Machine Capsule is adequate enough.
    Tony

  • Lost music file association in win 7 after installing iTunes.

    After installing iTunes on my win7 PC my music did not show up in iTunes and now when I go to the music files in windows it shows all the folders empty. I performed windows search on my drive and with some effort can find the music. Please note these files are not in the my music folder, they are in a file in my documents. ( I have a reason for that ).

    Ps the above question is how to I put it all back?

  • Adobe CS6 file associations are all messed up

    Many of CS6 file association extensions wont open;
    After installing CS6 many of the previous extensions .psd .prproj .ai, I found broken and Windows 7 (64bit) would ask what program to open it with.
    It would not give me the option to chose the obvious. So, I selected Control Panel\All Control Panel Items\Default Programs\Set Associations and select Photoshop cs6 .exe and it would not assign it.
    Same with several other files.
    Even files I made fresh from CS6 photoshop(64) it wont select or give option to open with the program it was made with. I have to open the program first and select the file from inside the program.
    Now Adobe Bridge CS6 shows all the files with a visual preview but when I select the file it says "windows cannot find 'C:\program file\adobe\adobe cs5 (64 bit)\photoshop.exe' make sure you typed the name correctly, then try again.
    Somehow I have to unlink the old extensions because cs5 is gone but I can't seem to change the associations until whatever residual cs5 registry ghost still lives in my machine.
    I have googled the problem and a lot of people are having this problem but no real fixes seem apparent or they are insanely drastic like wiping the whole drive and re-installing windows.
    I see that this has happened before with other upgrades on the forums i.e. cs4 to cs5 years back.
    This is my 6th upgrade and I gave adobe thousands and thousands of dollars and why is this problem not getting addressed when other been complaining about years ago and still not a viable solution is given.

    I used the CS Cleaner (http://www.adobe.com/support/contact/cscleanertool.html) and followed the steps its really easy.. but ur gonna have to re install you Creative Suite   all u do for the cleaner is open it up then select english (e) ->enter->Agree (Y)->enter->All (1) (which is the first option for a full clean i guess)->enter->Product Number its just basically asking you to input your choice number again (1)->enter and should tell u its all done then after u install CS again go to start-> default programs->associate file type->.psd for example->double click it and select Photoshop even though its probably already selected >.< but just do it again cuz it will refresh all the files on the coputer and whala you should c the correct file dysplay Heres pictures of my files before and after as proof idk if u managed to fix it but i recently got CS6 and drove me nuts tht there wasnt enough info on the web about this simple issue lol so i will post to help ppl in need !!

  • GNOME and KDE file associations

    Hi,
    I like to use KDE and GNOME, alternating between them. Sounds crazy, but I like both. Please, let's avoid the "GNOME vs. KDE" discussion, right?
    My problem is: I like to use different file associations when I'm using GNOME or KDE. For example, I'd like to associate text files with gedit in GNOME and with Kate in KDE. But if I associate text files to gedit in GNOME, when I run KDE and open a text file it opens gedit. If I associate them with Kate in KDE, when I'm using GNOME it'll use Kate as its text editor.
    Some time ago I could have both desktop environments without this mess. Can I have this behaviour back?

    Yeah, I got tired of Evolution not knowing about opening *.docs in openoffice.  After several hours of research, the key is the /usr/share/applications/mimeinfo.cache,  /opt/gnome/share/applications/mimeinfo.cache, and the MimeType fields in the *.desktop files.  The mimeinfo.cache in /usr was empty and the /opt one had gthumb and other apps but no OO:
    [MIME Cache]
    application/x-gnome-stones=gnome-stones.desktop
    image/jpeg=gthumb.desktop
    application/postscript=ggv.desktop
    ...snip...
    That's a lot of blather to say that the fix for Evolution/OpenOffice was to add the proper MimeType entry to /usr/share/applications/ooo645writer.desktop:
    MimeType=application/vnd.ms-word;application/msword
    and then run "update-desktop-database".  Problem solved.
    Another problem is that within Evolution it says an attached doc is a "application/msword" and not a "Microsoft Word Document".  Unfortunately this is because freedesktop.org decided to use application/vnd.ms-word instead of application/msword like the rest of the world.  If you check the vnd.ms-word entry in /usr/share/mime/packages/freedesktop.org.xml it defines an alias msword but the new mime system doesn't appear to recognize aliases yet.  The solution I used was to rename the entry to msword.  Another possible solution might be to remove the msword alias from the vnd.ms-word entry and create a new msword entry based on the vnd.ms-word one.  Then run "update-mime-database /usr/share/mime".  Hope that made sense.
    I think the defaults.list is part of the previous GNOME MIME setup cause I don't have one and I'm not experiencing any problems.  For other apps check for the associations in the mimeinfo.cache's and if missing add the MimeType's to the app's *.desktop.

  • How to make file associations in XFCE permanent

    Hi,
    I have a problem with file associations in XFCE (Thunar, actually), because I can't make it permanent. After setting up, they work fine, but they change to default values after some time.
    Anyone with same problem?:|

    is it all file associations? maybe updating certain programs would do it or thunar itself but i seriously doubt it because config should still be the same

  • Different program file associations in GNOME Trash folder

    So, for example, I've set up GNOME to run all *.avi files with mplayer. Now if I delete an *.avi file to a Trash folder and run it from there Banshee is used as a default associated program. In fact, mplayer is not in the "Open With..." sub-menu (only in Properties for this file but it is ignored anyway as I just described.)
    I've no idea why GNOME acts this way but I can provide some background information that might help pinpointing the real issue here. I first ran KDE on my Arch Linux setup. Somewhere along the way I decided to try GNOME and so I installed it alongside with KDE. When I first ran GNOME I had many files associated with KDE's programs (torrent files for instance).
    I'm relatively new to GNOME and maybe I should've clicked some magic button that re-creates an index of file association for GNOME but so far I haven't discovered one
    So, what can be done about this issue?

    Anyone having a trouble like that?

  • File associations change when new packages are installed (GNOME)

    Hello!
    Imagine I set Geany to open text files. It works, I just double click the files and they open with Geany. When I install Wine/Gedit/whatever... it overwrites my file association with Geany, opening it by default with notepad.exe/gedit/whatever.
    Can someone help me?
    Thanks, acmps

    I don't know why this happens sometimes after installing or messing around with wine, but I can also confirm multiple, false entries in that associations-list.
    But I know how to get rid of it after it happened (concerning these entries in my gnome-open-dialogue):
    Delete the files which fit in ~/.local/share/applications/* or have a look at mimeapps.list which is also located there

  • Can't delete a file displayed in ListView ("File in use") even after removing it from window.

    I have a ListView displaying a collection of icons. The user can then select different icons (checkboxes) to do things like Copy or Delete.
    Problem is, when I try to delete the actual file from the disk, I get an error telling me the file is "in use" ("vshost.exe", the VS runtime during testing).
    I thought maybe it was because it still appeared in the window and was still in the ImageList, but even after removing it from both locations, I still get the error. My code:
    Dim intCnt As Integer = 0
    Do
    ImageList2.Images.RemoveAt(intIconsChecked(intCnt)) ' Remove from collection.
    lsvCollection.Items.RemoveAt(intIconsChecked(intCnt)) ' Remove from ListView window.
    FileIO.FileSystem.DeleteFile(strIconPath & "\Icon" & Format(intCnt + 1, "00") & ".rsc") ' "+1" b/c Icons start with "01".
    FileIO.FileSystem.DeleteFile(strIconPath & "\Icon" & Format(intCnt + 1, "00") & ".png") ' "In use" Error here.
    ".rsc" deletes just fine, so I know I'm deleting the correct file. Why does VS still think the file is still "in use"?
    Thx

    Mugsy,
    Consider this as food for thought, even if you don't use it.
    If you set it up right then you can control how it works. A reference is a reference and any left behind will cause you grief down the road when you try to delete things.
    As an example, a simple class follows. It does *not* implement IDispose, although it does have a private shared Dispose method in it:
    Public Class MyImages
    Private _bmp As Bitmap
    Private _name As String
    Private _sourceFilePath As String
    Private Sub New(ByVal bmp As Bitmap, _
    ByVal name As String, _
    ByVal filePath As String)
    _bmp = bmp
    _sourceFilePath = filePath.Trim
    _name = name.Trim
    End Sub
    Public ReadOnly Property Bmp As Bitmap
    Get
    Return _bmp
    End Get
    End Property
    Public ReadOnly Property Name As String
    Get
    Return _name
    End Get
    End Property
    Public ReadOnly Property SourceFilePath As String
    Get
    Return _sourceFilePath
    End Get
    End Property
    Public Shared Sub AddNew(ByRef miList As List(Of MyImages), _
    ByVal imageFilePath As String)
    Try
    If miList Is Nothing Then
    Throw New ArgumentNullException("The collection of MyImages cannot be null.")
    ElseIf String.IsNullOrEmpty(imageFilePath) OrElse imageFilePath.Trim = "" Then
    Throw New ArgumentException("The file path of the image cannot be null or empty.")
    ElseIf Not My.Computer.FileSystem.FileExists(imageFilePath) Then
    Throw New IO.FileNotFoundException("The file path of the image could not be located.")
    Else
    ' Should do validation here that the file
    ' is actually an image but I'll not do this
    ' here...
    Dim thisBMP As Bitmap = New Bitmap(imageFilePath)
    miList.Add(New MyImages(thisBMP, GetFileNameWithoutExtension(imageFilePath), imageFilePath))
    End If
    Catch ex As Exception
    Throw
    End Try
    End Sub
    Public Shared Sub AddNew(ByRef miList As List(Of MyImages), _
    ByVal imageFilePath As String, _
    ByVal imageName As String)
    Try
    If miList Is Nothing Then
    Throw New ArgumentNullException("The collection of MyImages cannot be null.")
    ElseIf String.IsNullOrEmpty(imageFilePath) OrElse imageFilePath.Trim = "" Then
    Throw New ArgumentException("The file path of the image cannot be null or empty.")
    ElseIf Not My.Computer.FileSystem.FileExists(imageFilePath) Then
    Throw New IO.FileNotFoundException("The file path of the image could not be located.")
    ElseIf String.IsNullOrEmpty(imageName) OrElse imageName.Trim = "" Then
    Throw New ArgumentException("The name of this image cannot be null or empty.")
    Else
    ' Should do validation here that the file
    ' is actually an image but I'll not do this
    ' here...
    Dim thisBMP As Bitmap = New Bitmap(imageFilePath)
    miList.Add(New MyImages(thisBMP, imageName, imageFilePath))
    End If
    Catch ex As Exception
    Throw
    End Try
    End Sub
    Public Shared Sub Remove(ByRef miList As List(Of MyImages), _
    ByVal imageFilePath As String, _
    Optional ByVal removeFilePathAlso As Boolean = False)
    Try
    If miList Is Nothing Then
    Throw New ArgumentNullException("The collection of MyImages cannot be null.")
    ElseIf String.IsNullOrEmpty(imageFilePath) OrElse imageFilePath.Trim = "" Then
    Throw New ArgumentException("The file path of the image cannot be null or empty.")
    ElseIf Not My.Computer.FileSystem.FileExists(imageFilePath) Then
    Throw New IO.FileNotFoundException("The file path of the image could not be located.")
    Else
    Dim findInstance As System.Collections.Generic.IEnumerable(Of MyImages) = _
    From mi As MyImages In miList _
    Where mi.SourceFilePath = imageFilePath
    If findInstance.Count <> 1 Then
    Throw New ArgumentException("The instance of MyImages specified by the" & vbCrLf & _
    "image file path is not in the collection.")
    Else
    Dispose(findInstance.First)
    If removeFilePathAlso Then
    My.Computer.FileSystem.DeleteFile(findInstance.First.SourceFilePath)
    End If
    miList.Remove(findInstance.First)
    End If
    End If
    Catch ex As Exception
    Throw
    End Try
    End Sub
    Private Shared Sub Dispose(ByVal instance As MyImages)
    If instance IsNot Nothing AndAlso instance._bmp IsNot Nothing Then
    instance._bmp.Dispose()
    instance._bmp = Nothing
    End If
    End Sub
    End Class
    When you look through that, look specifically at the "Remove" method and in particular, look at the order in which things are done. That's the critical part in this.
    I tested it with a simple form:
    Two buttons, a checkbox, and a picturebox. I also copied a small folder full of image files to my desktop since I'll be deleting a file from it. Following is the code for Form1:
    Option Strict On
    Option Explicit On
    Option Infer Off
    Imports System.IO.Path
    Public Class Form1
    Private miList As New List(Of MyImages)
    Private Sub Form1_Load(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) _
    Handles MyBase.Load
    Dim desktop As String = _
    My.Computer.FileSystem.SpecialDirectories.Desktop
    Dim imgFolder As String = _
    Combine(desktop, "Images")
    PictureBox1.BorderStyle = BorderStyle.FixedSingle
    For Each imgFilePath As String In My.Computer.FileSystem.GetFiles(imgFolder)
    MyImages.AddNew(miList, imgFilePath)
    Next
    btn_RemoveFirstImage.Enabled = False
    CheckBox_RemoveSourcePath.Enabled = False
    End Sub
    Private Sub btn_ShowFirstImage_Click(sender As System.Object, _
    e As System.EventArgs) _
    Handles btn_ShowFirstImage.Click
    Try
    If miList.Count >= 1 Then
    With PictureBox1
    .SizeMode = PictureBoxSizeMode.Zoom
    .Image = miList(0).Bmp
    End With
    btn_RemoveFirstImage.Enabled = True
    CheckBox_RemoveSourcePath.Enabled = True
    End If
    Catch ex As Exception
    MessageBox.Show(String.Format("An exception was thrown:{0}{0}{1}", vbCrLf, ex.Message), _
    "Exception", MessageBoxButtons.OK, MessageBoxIcon.Warning)
    End Try
    End Sub
    Private Sub btn_RemoveFirstImage_Click(sender As System.Object, _
    e As System.EventArgs) _
    Handles btn_RemoveFirstImage.Click
    Try
    If miList.Count >= 1 Then
    MyImages.Remove(miList, miList(0).SourceFilePath, CheckBox_RemoveSourcePath.Checked)
    End If
    PictureBox1.Image = Nothing
    btn_RemoveFirstImage.Enabled = True
    CheckBox_RemoveSourcePath.Enabled = True
    Catch ex As Exception
    MessageBox.Show(String.Format("An exception was thrown:{0}{0}{1}", vbCrLf, ex.Message), _
    "Exception", MessageBoxButtons.OK, MessageBoxIcon.Warning)
    End Try
    End Sub
    End Class
    Running it is straightforward:
    Now when I click to show the first one:
    A different image is shown because that first one no longer exists - either in the collection or in the folder.
    Closing/disposing all references is the key and the order matters.
    Something to consider the next time around. :)
    Still lost in code, just at a little higher level.

  • Lost all file associations after updating to CC 2014 and uninstalling CC

    Installed IN, AI, PS CC 2014. Uninstalled IN, AI, PS 2014. Lost all file associations. Win 7 and Win 8. Anyone else?

    read reply #3 about the ORDER of uninstalling & installing
    If you uninstall and reinstall to fix, run the cleaner after UN and before RE
    Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6

  • How to remove empty lines from xml files after removing nodes from document

    <pre>
    Hi
    <b>i have xml document, which is shown below
    after removing some nodes from the document ,i am getting empty lines in place of removed nodes,how to resolve this and get the proper xml document without any errors</b>
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <!DOCTYPE Message SYSTEM "TRD01.dtd">
    <Message>
    <Header>
    <CounterPartyType>CLIENT</CounterPartyType>
    <CreationTime>20134455</CreationTime>
    <ErrorCode>363 </ErrorCode>
    <ErrorEnterPriseId>N</ErrorEnterPriseId>
    <ErrorStatus>1</ErrorStatus>
    <ErrorSystemId>STL</ErrorSystemId>
    <ErrorTimes>31</ErrorTimes>
    <MessageType>T</MessageType>
    <RecipientEnterpriseId>N</RecipientEnterpriseId>
    <RecipentSystemId>EXM</RecipentSystemId>
    <Remarks>REMARSK</Remarks>
    <SenderEnterpriseId>N</SenderEnterpriseId>
    <SenderSystemId>TR</SenderSystemId>
    </Header>
    </Message>
    <ErrorCode>363 </ErrorCode>
    <ErrorEnterPriseId>NIHK</ErrorEnterPriseId>
    <ErrorStatus>1</ErrorStatus>
    <ErrorSystemId>STL</ErrorSystemId>
    <ErrorTimes>31</ErrorTimes>
    XPathExpression expression5 = xpath.compile(xmlpath5);
    Object result5 = expression5.evaluate(doc, XPathConstants.NODE);
    Node node5 = (Node) result5;
    node5.getParentNode().removeChild(node5);
    XPathExpression expression6 = xpath.compile(xmlpath6);
    Object result6 = expression6.evaluate(doc, XPathConstants.NODE);
    Node node6=(Node) result6;
    node6.getParentNode().removeChild(node6);
    XPathExpression expression7 = xpath.compile(xmlpath7);
    Object result7 = expression7.evaluate(doc, XPathConstants.NODE);
    Node node7=(Node) result7;
    node7.getParentNode().removeChild(node7);
    doc.normalize();
    doc.normalizeDocument();
    TransformerFactory tf = TransformerFactory.newInstance();
    Transformer t = tf.newTransformer();
    t.setOutputProperty(OutputKeys.INDENT, "yes");
    t.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
    t.setOutputProperty(OutputKeys.METHOD,"xml");
    t.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
    the xml output i am getting is
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <Message>
    <Header>
    <CounterPartyType>CLIENT</CounterPartyType>
    <CreationTime>20134455</CreationTime>
    <MessageType>TRD01</MessageType>
    <RecipientEnterpriseId>N</RecipientEnterpriseId>
    <RecipentSystemId>STL</RecipentSystemId>
    <Remarks>REMARSK</Remarks>
    <SenderEnterpriseId>N</SenderEnterpriseId>
    <SenderSystemId>T</SenderSystemId>
    </Header>
    </Message>
    <b>could you please let me know how to avoid empty lines in the xml doucment output</b>
    this is the method i am using to get the result
    public void ValidateRecord(String xml){
    try{
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder db = factory.newDocumentBuilder();
    //parse file into DOM
    /*DOMParser parser = new DOMParser();
    parser.setErrorStream(System.err);
    parser.setValidationMode(DTD_validation);
    parser.showWarnings(true);*/
    System.out.println ("HI THIS xml is validation "+xml);
    Resolver res = new Resolver();
    db.setEntityResolver(res);
    Document doc = db.parse(new InputSource(new StringReader(xml)));
    XPathFactory xpf = XPathFactory.newInstance();
    XPath xpath = xpf.newXPath();
    // XPathExpression expression = xpath.compile("//A/B[C/E/text()=13]");
    String xmlpath="/Message/Header/CounterPartyType/text()";
    String xmlpath1="/Message/Header/RecipentSystemId/text()";
    String xmlpath2="/Message/Header/ErrorSystemId/text()";
    XPathExpression expression = xpath.compile(xmlpath);
    XPathExpression expression1 = xpath.compile(xmlpath2);
    Object result = expression.evaluate(doc, XPathConstants.NODE);
    Object result1 = expression1.evaluate(doc, XPathConstants.NODE);
    Node node = (Node) result;
    Node node1 = (Node) result1;
    System.out.println("the values of the string is " +node.getNodeValue());
    System.out.println("the values of the string is " +node1.getNodeValue());
    // for (int i = 0; i < nodes.getLength(); i++) {
    //System.out.println(nodes.item(i).getNodeValue());
    // CAHNGING THE RECEIPENT NODE
    XPathExpression expression2 = xpath.compile(xmlpath1);
    Object result2 = expression2.evaluate(doc, XPathConstants.NODE);
    Node node2 = (Node) result2;
    System.out.println(node2);
    node2.setNodeValue(node1.getNodeValue());
    System.out.println(node2);
    //removing the nodes from document
    String xmlpath3="/Message/Header/ErrorCode";
    String xmlpath4="/Message/Header/ErrorEnterPriseId";
    String xmlpath5="/Message/Header/ErrorStatus";
    String xmlpath6="/Message/Header/ErrorSystemId";
    String xmlpath7="/Message/Header/ErrorTimes";
    XPathExpression expression3 = xpath.compile(xmlpath3);
    Object result3 = expression3.evaluate(doc, XPathConstants.NODE);
    Node node3 = (Node) result3;
    node3.getParentNode().removeChild(node3);
    XPathExpression expression4 = xpath.compile(xmlpath4);
    Object result4 = expression4.evaluate(doc, XPathConstants.NODE);
    Node node4 = (Node) result4;
    System.out.println("node value");
    System.out.println(node4.getParentNode().getNodeName());
    node4.getParentNode().removeChild(node4);
    XPathExpression expression5 = xpath.compile(xmlpath5);
    Object result5 = expression5.evaluate(doc, XPathConstants.NODE);
    Node node5 = (Node) result5;
    node5.getParentNode().removeChild(node5);
    XPathExpression expression6 = xpath.compile(xmlpath6);
    Object result6 = expression6.evaluate(doc, XPathConstants.NODE);
    Node node6=(Node) result6;
    node6.getParentNode().removeChild(node6);
    XPathExpression expression7 = xpath.compile(xmlpath7);
    Object result7 = expression7.evaluate(doc, XPathConstants.NODE);
    Node node7=(Node) result7;
    node7.getParentNode().removeChild(node7);
    // Node b13Node = (Node) expression.evaluate(doc, XPathConstants.NODE);
    //b13Node.getParentNode().removeChild(b13Node);
    doc.normalize();
    doc.normalizeDocument();
    TransformerFactory tf = TransformerFactory.newInstance();
    Transformer t = tf.newTransformer();
    t.setOutputProperty(OutputKeys.INDENT, "yes");
    t.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
    t.setOutputProperty(OutputKeys.METHOD,"xml");
    t.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
    t.transform(new DOMSource(doc), new StreamResult(System.out));
    catch (Exception e) {
         e.printStackTrace();
    System.out.println(e.getMessage());
    </pre>
    Edited by: user12185243 on Apr 6, 2013 6:38 AM
    Edited by: user12185243 on Apr 6, 2013 6:41 AM
    Edited by: user12185243 on Apr 6, 2013 6:43 AM
    Edited by: user12185243 on Apr 6, 2013 6:45 AM
    Edited by: user12185243 on Apr 6, 2013 9:00 AM

    either this way we can do this
    1)
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    <b> factory.setIgnoringElementContentWhitespace(true); </b>
    DocumentBuilder db = factory.newDocumentBuilder();
    or
    2)
    java.io.StringWriter sw = new java.io.StringWriter();
    StreamResult sr = new StreamResult(sw);
    t.transform(new DOMSource(doc), sr);
    String xml1 = sw.toString().trim();
    <b> xml1=xml1.replaceAll("\\s",""); </b>
    System.out.println(xml1.trim());

  • How To Remove PHP Extension File Association With Internet Explorer

    When I select a PHP file to open it is redirected to be downloaded and opened (or I can choose to save) in Internet Explorer.  I need to test the file in different browsers.  How can I remove this automatic association?
    I've tried selecting a php file from Windows Explorer and selecting a different browser with no success.  I recently bought a new computer with Windows 8.  It's a big jump from my old one which used XP where there was no problem opening files with
    a php extension.
    Pat

    it sounds like you have a file association for .php, and, that you don't want to have one, so the original default behaviour would instead be preferable?
    This discussion, although for Win7, may be helpful:
    (the discussion occurs between "camelgrass" and "Brink")
    http://www.sevenforums.com/tutorials/19449-default-file-type-associations-restore.html#post259052
    Don
    (Please take a moment to "Vote as Helpful" and/or "Mark as Answer", where applicable.
    This helps the community, keeps the forums tidy, and recognises useful contributions. Thanks!)

  • File sizes explodes after removing hidden information

    After removing hidden content in Acrobat Pro X (Tools/remove hidden content or Tools/sanitize) the file size increases, up to 10x (2 MB -> 20 MB). Save as optimized PDF only partly reduces the problem, file is still 3-4x the initial size. Document was created with Adobe PDF writer, but this problem occurs in principle also with other PDFs. Bug? Necessary? Workaround? Any help is appreciated. Thanks in advance!

    Any one found a solution to this problem?
    I'm having it too, acrobat xi pro 11.0.10...
    Original file size before cropping ~27MB
    Same file saved as optimized PDF before cropping ~12MB
    Original file size after cropping ~27MB
    Same file saved as optimized PDF after cropping ~12MB
    Original file saved as some other file name after removing hidden information ~60MB
    Same file saved as optimized PDF after cropping AND after removing hidden information ~60MB
    What on earth is going on?

Maybe you are looking for

  • Adding shutterfly upload software changed the defaul mail program in iPhoto

    I recently added the shutterfly upload software for iPhoto and in the process, it changed my default email program in iPhoto from Mail to some new microsoft program. I went into preferences to change back, but now Mail is greyed out and not an option

  • Limiting directory admins rights

    I am looking to create some dirctory admin users but I don't want them to be full directory admins. I just want them to be able to make any changes to the computers and the computer groups and not to be able to do anything with users or user groups.

  • What are the following tablespaces / datafiles?

    I have the following tablespaces and corresponding datafiles ... hoping someone can help me identify the application for it. Or what was the previous DBA doing? tablespace / datafile CONSTANT_GROW_INDEXES / SCM_CGIND.DBF etc .. DEPENDENCY_INDEXES / S

  • PIP shapes ?

    Can anyone tell me how to change the shape of a PIP to a circle or oval shape. Thanks !

  • Function not returning table object correctly

    Instead of returning a table, my function is returning this: SCHEMA_OWNER.TBL_SUMS([SCHEMA_OWNER.SUMS_OBJ]) Does anyone see a syntax error in my function or the ddl of my table and object types? This is a stripped down, simplified version of my funct