How to upload an XML file properly?

Hi

I am trying to upload an XML file which is originally downloaded from Azure Storage container using the 'Download' feature. But when I am uploading the same XML file using Azure CLI (node.js) from my Desktop, all the XML tags are removed from the uploaded file.

Original file:

<PersistentVM xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ConfigurationSets> <ConfigurationSet xsi:type="NetworkConfigurationSet"> <ConfigurationSetType>NetworkConfiguration</ConfigurationSetType> <InputEndpoints> <InputEndpoint> <LocalPort>22</LocalPort> <Name>SSH</Name> <Port>22</Port> <Protocol>tcp</Protocol> <Vip>168.61.146.95</Vip> <EnableDirectServerReturn>false</EnableDirectServerReturn> <IdleTimeoutInMinutes xsi:nil="true"/> </InputEndpoint> </InputEndpoints> <SubnetNames/> <PublicIPs/> <NetworkInterfaces/> </ConfigurationSet> </ConfigurationSets> <DataVirtualHardDisks/> <OSVirtualHardDisk> <HostCaching>ReadWrite</HostCaching> <DiskName>azero-azero-0-201508240954010550</DiskName> <SourceImageName> 5112500ae3b842c8b9c604889f8753c3__OpenLogic-CentOS-65-20150605 </SourceImageName> <OS>Linux</OS> <IOType>Standard</IOType> <ResizedSizeInGB xsi:nil="true"/> </OSVirtualHardDisk> <RoleName>azero</RoleName> <RoleSize>ExtraSmall</RoleSize> <RoleType>PersistentVMRole</RoleType> <NoExportPrivateKey>false</NoExportPrivateKey> <NoRDPEndpoint>false</NoRDPEndpoint> <NoSSHEndpoint>false</NoSSHEndpoint> <ProvisionGuestAgent>false</ProvisionGuestAgent> <ResourceExtensionReferences/>

</PersistentVM>

File after Upload:

NetworkConfiguration
      
        
          22
          SSH
          22
          tcp
          168.61.157.111
          false
          
        
      
      
      
      
    
 
 
 
    ReadWrite
    azero-azero-0-201508210528270721
    5112500ae3b842c8b9c604889f8753c3__OpenLogic-CentOS-65-20150605
    Linux
    Standard
    
 
  azero
  ExtraSmall
  PersistentVMRole
  false
  false
  false
  false


So, what's the correct way to upload an XML file? Actually I've to edit this XML file, but I don't know how to do it using Azure Powershell that's why I am downloading it.

Any information would be helpful.

TIA




September 1st, 2015 4:20am

Do you need to sue POwershell or are you looking for a tool to upload files.

If you are looking for a tool, you can try this

Free Windows Admin Tool Kit Click here and download it now
September 1st, 2015 4:51am

Hi Samir

Yes, I need to use Powershell, as I want to edit the XML file.

September 1st, 2015 10:17am

Hi Dipan, 

Could you check this link https://alexandrebrisebois.wordpress.com/2015/02/03/using-powershell-to-upload-content-to-azure-storage/

Free Windows Admin Tool Kit Click here and download it now
September 3rd, 2015 1:58pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics