Powershell changes xml even if not asked to

Im reading an xml file into powershell xml variable.
Originally I was modifying some values in the file, and saving it back out, but found the app that uses the file was discarding it as it found issues.
So if I read in the file, don't change anything but then save it as a new file, powershell changes the xml!
there are extra spaces and other things added.
One thing I notice its doing is for an empty element, it adds a space between the element and the forward slash.
e.g.
before save <element/>
after save <element />
Here is the code im using.
[xml]$fileContents = Get-Content -Path $XMLConfigFileLocation
$fileContents.Save($xmlWorkingFile)
This is causing a 3rd party app that uses the file to throw errors.
Im aware the 3rd party app probably is not processing the xml file correctly but i have no control over that.
Any ideas why powershell modifies the file?

Hi,
Just checking in to see if the suggestions were helpful. Please let us know if you would like further assistance.
TechNet Subscriber Support
If you are
TechNet Subscription
user and have any feedback on our support quality, please send your feedback
here.
Regards, Yan Li

Similar Messages

  • Icloud is asking for my pw for backup - both Apple Id and pw and have changed and they are not asking for my new?

    Received an email from Apple concerning my AOL email not being valid
    after March 31 and instructions how to convert to another active email
    address - new apple id and pw updated yesterday.  Now when I go
    on my iphone, icloud asks me for pw to old aol email ID - which I have
    forgotten - but that is not now the current Apple Id for my ITunes account.
    Not sure how to change it on my phone - when I try to sign out of icloud
    so I can go back in and re-enter info, it asks for pw to shut off find my
    iphone and I have forgotten the pw. Thanks for any help!

    Hello there RmCrCo,
    it sounds like you need to reset the password for the account you have signed in on your phone you should be able to get that reset wiht this article:
    iCloud: Change your iCloud password
    Thank you for using Apple Support Communities.
    Take care,
    Sterling

  • HT5312 My recovery email is no longer in use, as it hasn't been used for sometime, and now seems to have 'expired', and I do not even recall being asked the security questions,so I can no longer download certain games. Please help.

    I cannot download certain games because I do not recall the answers to my security questions when it asks if I am 17 years or older. In fact, I do not even recall being asked these security questions.
    I tried to guess logical answers but now my iPad is threatening to lock me out. My second email is no longer in use as it has not been used for years and has seemingly expired.
    Can you please help?

    If you don't have access to your rescue email account, or you don't have one on your account (an alternate/secondary email address is a different setting/address), then you will need contact iTunes Support or Apple to get the questions reset (you won't be able to change/add a rescue email address until you can answer 2 of your questions)
    e.g. you can try contacting iTunes Support : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Account Management , and then 'Forgotten Apple ID security questions'
    or try ringing Apple in your country and ask to talk to the Accounts Security Team : http://support.apple.com/kb/HE57
    When they've been reset you can then use the steps half-way down the page that you posted from to update/add a rescue email address for potential future use

  • The last apple ID used on my App Store is stuck how do I change back to my apple ID? I can't download anything because its not asking for my apple ID and password, help?

    help, the last apple ID used to download in my ipad2 is stuck, I can't download anything because its not asking for my apple ID and password, how do I change it back to mine?

    Again, this only affects you if someone *redownloaded* content with a different ID. In my case, I emailed iTunes Store support, explained the situation, and they reset the counter.  I recommend you try the same
    If you read discussion boards, this is a significant change from a year ago, when Apple told people in the same situation to go f&$# themselves.  Clearly it's dawning on them that this is a stupid policy, and my guess is if people keep complaining they'll change it to something more reasonable.  Remember, it wasn't that long ago you couldn't re-download content at all.
    Apple can't really afford to play hardball on this. Sure, the hardcore fanboys will always say "Thank you sir, may I have another" whatever Apple throws at them,  but the rest of us will just switch to Amazon, which has none of these restrictions.

  • I accidentally clicked "do not ask me this again" about forcing an extension change when downloading. How do i get firefox to ask me this again?

    I was using download helper and a box usually pops up that asks me if i want to force an extension change. I clicked the wrong box and then clicked "do not ask me this again". I would like to get the box back so i can change the setting.

    This could be a setting in the add-on. In some cases, you can access an add-on's setting from its icon on the Add-on Bar. In other cases, you can access it from here:
    orange Firefox button ''or'' Tools menu > Add-ons > Extensions category
    Look for the add-on's "Options" button
    Any luck?

  • How to accept xml even when elements are not defined in its schema

    Hi,
    I got this requirement where i need to accept xmls even though its schema definition is not available note that i am storing the xmls into obejection-relational mode in oracle xmltype column table.
    How can i register schamas which has a perticular element defined conditionally to refer to two schemas based on its elementname (pct:CompanyName and CompanyName), please go through the below given scenario for further clarity on the same
    Oracle Version
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE 11.2.0.3.0 Production
    *Sample XML
    * <CabInfo>
         <pct:CabName>Yellow Cab</pct:CabName>
         <CompanyName>Taxi4You<CompanyName>
    </CabInfo>
    Schema Definition
    Cab.xsd
    <xsd:All minOccur="0">
    <xsd:element name="CabInfo" type="pct:Cabs" minOccurs="0"/>
    </xsd:All>
    pct points to a commontype.xsd file
    <xsd:complexType name="Cabs">
    <xsd:all minOccurs="0">
    <xsd:element name="CabName" type="xsd:string" minOccurs="0"/>
    <xsd:element name="CompanyName" type="xsd:string" minOccurs="0"/>
    </xsd:all>
    </xsd:complexType>
    Now when a xml comes with both the tags pct:CabName and pct:CompanyName then its not an issue however i need to accept xmls which can come as pct:CabName and only CompanyName without the pct namespace referrence.
    I was considering choice tags a method to acheive this but i read it cannot be used with ALL i cant remove ALL either from my schema.
    Please suggest if this can be acheived.

    Hello,
    You can use module pool to design the screen, all the fields will then remain fixed in the position defined.
    CALL SCREEN 100. " 3 fields declared P_NAME p_ROL and P_SUBJECT
    *&      Module  STATUS_0100  OUTPUT
    *       text
    MODULE status_0100 OUTPUT.
    *  SET PF-STATUS 'xxxxxxxx'.
    *  SET TITLEBAR 'xxx'.
      LOOP AT SCREEN.
        IF screen-name = 'P_ROL'.
          screen-active = '0'.
          screen-invisible = '1'.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.
    Regards,
    Mansi.
    Edited by: SAP USER on Apr 22, 2009 1:02 PM

  • HT1430 wi-fi connection doesnt work, even can not put it ON. What to do? at the store guys told that they can change my iphone for 300 euros....

    wi-fi connection doesnt work, even can not put it ON. What to do? at the store guys told that they can change my iphone for 300 euros....

    Read this it might help http://support.apple.com/kb/ts1559

  • Changed itunes apple password. iCloud asked later to put in iCloud password. Used changed apple password iCloud doesn't accept it. Tied old iCloud password does not accept that either. Don't know what to do

    Changed itunes apple password. iCloud asked later to put in iCloud password. Used changed apple password iCloud doesn't accept it. Tied old iCloud password does not accept that either. Don't know what to do

    If you mean that Find My Phone is asking for a password to a different Apple ID to your current Apple ID.
    This feature has been introduced to make stolen phones useless to those that have stolen them.
    However it can also arise when the user has changed their Apple ID details with Apple and not made the same changes to their iCloud account/Find My Phone on their device before upgrading to iOS 7, or if you restore from a previous back up made before you changed your details.
    The only solution is to change your Apple ID back to its previous state with Apple at My Apple ID using your current password, you don’t need access to this address if it’s previously been used with your Apple ID, once you have saved these details enter the password as requested on your device and then turn off "find my phone" and delete the account from your device.
    You should then change your Apple ID back to its current state, save it once again and then log back in using your current Apple ID. Finally, turn "find my phone" back on once again.
    This article provides more information about Activation Lock.

  • I lost all my data after upgrading to iOS5.1. It did not ask me even one single question to delete or sync anything

    I tried to restore it but it gave me nothing but empty iPad. I don't use any other 'i' things. I upgrade and install my new computer and update iTunes.
    It did not ask me anything about my connecting and I ask for updateing old software. Everything is gone TOO smoth and yes clean iPad.
    I tried to find the answer in Internet but it did not fit my case. And they are lucky to have back up or other product from Apple to resync.
    I guess this will be the last one. I also have Samsung Andriod and I like it very much even it costs me very little, quick, shape, not confusing, type it easily, not gugu.
    SO NEXT ONE, I WILL BUY TABLET FROM SAMSUNG.

    I thought it is a intuitive idea to back up. But another problem I heard it before is someone lost the data when he synced his new iTune with the iPad with full data. And it synced iPad empty. I could happen.
    True I should back up, which I did not lost my data much except my notes in iPad.
    My complain is to say normal sensible OS will not do this. My Samsung did not have fansy iTune which I have to be careful too much. I just keep/remove things without warrying stupid sync.
    As you all seem has experience how to use iTune, but I don't. I cannot use it simple.

  • I recently changed my wifi password at home and now my iphone will not connect.  It will not ask me for a password just says will not connect to network.  Advice on how to get iphone to ask network password for wifi?

    I recently changed my wifi password at home and now my iphone will not connect.  It will not ask me for a password just says will not connect to network.  Advice on how to get iphone to ask network password for wifi?

    First, try tapping on the network in the Wi-Fi settings and then tap "forget this network". Then reselect the network in the main Wi-Fi settings screen and see if will then ask for a password. If not, try resetting the Network Settings in the General -> Reset section and then reconnecting to your W-iFi.
    Hope this helps.

  • I have Lightroom 3 and have installed it on my Retina iMac running Yosemite. It will not show me any of the modules..error when attempting to change modules.. and keeps asking for my serial number every time. Is it compatible?

    I have Lightroom 3 and have installed it on my Retina iMac running Yosemite. It will not show me any of the modules..error when attempting to change modules.. and keeps asking for my serial number every time. Is it compatible?
    David

    This is a duplicate thread - see here

  • Xcode 4.2 not ask to save changes

    Why xcode 4.2 will not ask: "to save changes or not", for example when I delete \ altering anything in the StoryBoard and elsewhere? Wen I close xcode, it's just save any changes I did, but I do not want to do this. That's bad, I can do any modifications in my project and then just hit close button and it's will be saved without any warning messages, but if i do not want to save?

    Llessur999 wrote:
    KT is pointing you to the very first first preference, Xcode > Preferences > General > Auto-save.
    No he isn't.  Those links just go the introductory pages, which say nothing about this.  As usual for him.
    There is no preference for this in Xcode, which is probably WHY THIS GUY ASKED.
    This situation is a lot worse than simply not asking to save a file.  Lion is deleting work.
    Last night I typed a non-trivial paragraph of code into a source file.  And saved it.  I hit Command-S after every line of code, no exaggeration.  A few minutes later, I was scrolling up and down madly looking for it and couldn't find it.  In case I accidentally put it in the wrong file, I searched the whole project for a string I knew I'd used.  Nowhere to be found.
    Suddenly Xcode presents a dialog complaining that it couldn't autosave the file because it had been modified externally.  Did I want to "revert", or save what was in the editor?
    I've been seeing these dialogs on both my machines intermittently for weeks.  Same versions of everything on each system: OS, dev tools.  Same project.  Usually I opt to save what's in the editor, thinking that it must be the correct version.  Well now I know otherwise.  I hit "Revert", and the block of code magically reappeared on my screen.
    No, there was nothing else running that could've deleted code.  At least, not anything visible.
    But it occurred to me that this might be Lion file-management crap gone seriously and dangerously wrong.  And now that other people are reporting the same thing, it looks like that suspicion is being borne out.

  • SAP Note asks me to change Web Dynpro application

    Hello Gurus,
    Firstly I am very new to WebDynpro - JAVA.
    SAP note asks me to do following
    In netweaver Developer studio IDE, in the project esa~lea  select Fcform in the webdynpro components.
    2. Select the component controller , in the implementation
    go to the method setLeadSelectionForSubtype
    3. Replace the code
    4. save the changes and build and deploy the DC essleasap.com
    Please guide me what setttings I must do in NWDS and how to go about. How to access the project esa~lea, is it local (download from server) or through remote.
    If you can guide me step by step, it would be of great help.
    Best Regards,
    nagendra krishna
    [email protected]

    Hi ,
    If you have already created the webdynpro project,
    Open your component controller by dbl clicking on it and move on to the tab called implementation.
    No find the method called setLeadSelectionForSubtype
    and paste your code with in the space like the following.
    //@@begin setLeadSelectionForSubtype()
        //@@end
    Save.
    Now right click on your project name... build it by choosing
    Development Component  ---> Build
    then next
    Development Component  ---> Deploy.
    Before Deploying first set your server details in which you want to deploy.
    Go to Windows menu- > preferance ->  SAP J2EE Engine -> specify Server ip and port...  _> Apply and Ok..
    Now deploy it...
    Hope it helps....Please reward points if helps...
    Thanks
    avijit

  • I am going crazy changing passwords that do not get recognized by the different services when it is time to use them, until I am asked to change the password again, until the next time I need to use it and it does not get recognized again. Is there any fi

    I am going crazy changing passwords that do not get recognized by the different services when it is time to use them, until I am asked to change the password again, starting the vicious cycle again: i need to use the password, it does not get recognized three times, then the system asks me to change it again, and again, and I am stuck!! Is there any fix for this "glitch?

    The first thing I would suggest is for you to go to the folder containing your catalog, using your system browser. There will be a folder that has the extension .lrdata. Delete that folder, and then try to start Lightroom. If that doesn't work, replace your catalog with your most recent backup.

  • Package javax.xml.rpc does not exist

    Hi, I'm sure this is probably a basic error, which one of you Java gurus can solve instantly. I haven't used Java since 2001 and my development machine didn't even have a JDK installed until this morning!
    I'm trying to create a Java client for my web service, it's COM/ASP on IIS before you ask how I did it without using Java...
    Basically, I've installed J2SE v1.4.2_02, and also WSDP jwsdp-1.3, and I'm using the tutorial example at:
    http://java.sun.com/webservices/docs/1.3/tutorial/doc/JAXRPC5.html#wp79973 to create a dynamic proxy client. I assume this is what I need to do to access an existing web service?
    I've copied and pasted the code into my editor and saved it as HelloClient.java. I will change the URL/URI, service name, port, etc. later on.
    Now, at the cmd prompt...
    D:\source\DCIS\sdk\java\dynamicproxy>javac HelloClient.java
    HelloClient.java:4: package javax.xml.rpc does not exist
    import javax.xml.rpc.Service;
    ^
    HelloClient.java:5: package javax.xml.rpc does not exist
    import javax.xml.rpc.JAXRPCException;
    ^
    HelloClient.java:6: package javax.xml.namespace does not exist
    import javax.xml.namespace.QName;
    ^
    HelloClient.java:7: package javax.xml.rpc does not exist
    import javax.xml.rpc.ServiceFactory;
    I expect this is something to do with environment variables:
    PATH=C:\WINNT\system32;
    C:\WINNT;C:\WINNT\System32\Wbem;
    C:\Program Files\Microsoft SDK\Bin\.;
    C:\Program Files\Microsoft SDK\Bin\WinNT\.;
    d:\j2sdk1.4.2_02\bin\;
    d:\jwsdp-1.3\jwsdp-shared\bin\;
    d:\jwsdp-1.3\apache-ant\bin\
    CLASSPATH=.;
    Is there something I need to set in my classpath for this?
    I know the tutorial suggests using Ant to build the example, but as far as I can tell that uses Tomcat, and I only want to build a client application! There must be a way to get around this...
    TIA for any help you give me!

    Hi,
    I am getting this error message when i try to create the webservice client.
    D:\Sun\AppServer\apps\dynamic-proxy>javac -classpath build -d build MathClient.java
    MathClient.java:4: package javax.xml.rpc does not exist
    import javax.xml.rpc.Service;
    ^
    MathClient.java:5: package javax.xml.rpc does not exist
    import javax.xml.rpc.JAXRPCException;
    ^
    MathClient.java:7: package javax.xml.rpc does not exist
    import javax.xml.rpc.ServiceFactory;
    ^
    MathClient.java:8: cannot find symbol
    symbol : class FirstIF
    location: package dynamicproxy
    import dynamicproxy.FirstIF;
    ^
    MathClient.java:23: cannot find symbol
    symbol : class ServiceFactory
    location: class dynamicproxy.MathClient
    ServiceFactory serviceFactory = ServiceFactory.newInstance();
    ^
    MathClient.java:23: cannot find symbol
    symbol : variable ServiceFactory
    location: class dynamicproxy.MathClient
    ServiceFactory serviceFactory = ServiceFactory.newInstance();
    ^
    MathClient.java:26: cannot find symbol
    symbol : class Service
    location: class dynamicproxy.MathClient
    Service mathService = serviceFactory.createService(url,
    ^
    7 errors
    After looking at your response to add the classpath to this jar file.
    jaxrpc-spi.jar.
    But when i looked into my folder found that missing this jar file.
    where i can i download this file?
    I would like to know the error message that i have got is because of this missing file?
    Please guide me on this issue.
    Thanks!

Maybe you are looking for

  • JTextField and character length

    Hi everybody!! Please tell me how can I set my JTextField so that an user can't enter more that certain numbers of characters. Thanks in advance

  • How system calculate miro amount

    Hi Consultant, PO 2 unit at $12 During GR Dr inventory 24 Cr vendor 24 When in miro, 1) quantity i change to 3 unit and amount remained as 24 cr vendor 24 dr gr/ir      32 cr price diff 8 may i know why gr/ir debited 32 and with price difference? Whe

  • BPEL and Coldfusion

    Hello *! I wanted to consume the HelloWorld webservice with Coldfusion, but I always get an HTTP 500 - Internal server error and the application log says "Web service operation initiate with parameters {payload={something}} cannot be found." The page

  • In MOS I cannot find an option to file an SR for Oracle linux OS.

    In my oracle support I cannot find any OS options when trying to file an SR. Did they get rid of this option?

  • Does anyone know a source for a EOS D30 camera lithium battery cover CB2 0666-000

    I am wondering if anyone can help me. I have a Canon EOS D30 I inherited from my parents. They hardly used it, so I would like to sell it. However, the round black battery cover for the lithium battery on the bottom of the camera is missing. I though