Powershell read XML format config file
upload.xml
<?xml version="1.0" ?>
<ftpConfig>
<Protocol>ftp</Protocol>
<HostName>127.0.0.1</HostName>
<UserName>admin</UserName>
<Password>Password</Password>
<RemotePath>/e/test/path/data/</RemotePath>
<LocalPath>e:\test\path\data\</LocalPath>
</ftpConfig>
$xmlData=[xml](Get-Content "E:\test\path\scripts\upload.xml")
$localPath = $xmlData.ftpConfig.LocalPath
$remotePath = $xmlData.ftpConfig.RemotePath
Powershell read XML format config file的更多相关文章
- 配置文件操作(ini、cfg、xml、config等格式)
配置文件的格式主要有ini.xml.config等,现在对这些格式的配置文件的操作(C#)进行简单说明. INI配置文件操作 调用系统函数GetPrivateProfileString()和Write ...
- Camel routes in Spring config file
The normal spring bean definition configuration file, the xsi:schemaLocation only has two: beans and ...
- Create a custom configSection in web.config or app.config file
config file: <?xml version="1.0" encoding="utf-8" ?> <configuration> ...
- 2017.12.20 Java中的 IO/XML学习总结 File类详细
IO / XML 一.File类 1.定义/概念 Java是面向对象的语言,要想把数据存到文件中,就必须要有一个对象表示这个文件.File类的作用就是代表一个特定的文件或目录,并提供了若干方法对这些文 ...
- MVC模式下unity配置,报错“No connection string named '**Context' could be found in the application config file”
写在前面: 第一次配置时好好的,后来第二次改到MVC模式,把依赖注入写成字典的单例模式时,由于新建的ORM(数据库映射模型EF),怎么弄都不用,一直报错"No connection str ...
- Example config file /etc/vsftpd.conf
# Example config file /etc/vsftpd.conf # # The default compiled in settings are fairly paranoid. Thi ...
- Can not find connection pool config file
暂时未解决 checkActivation=====================true Can Not Parse ConnectionCfg! 2019/10/12-11:23:38 > ...
- [笔记]HAproxy reload config file with uninterrupt session
HAProxy is a high performance load balancer. It is very light-weight, and free, making it a great op ...
- error in config file "/etc/rabbitmq/rabbitmq.config"
记录一次RabbitMQ配置文件配置错误 error信息: dill@ubuntu-vm:/usr/share/doc/rabbitmq-server$ sudo /usr/lib/rabbitmq/ ...
随机推荐
- 3486 ( Interviewe )RMQ
Problem Description YaoYao has a company and he wants to employ m people recently. Since his company ...
- Asp.net中GridView使用详解(很全,很经典)
http://blog.csdn.net/hello_world_wusu/article/details/4052844 Asp.net中GridView使用详解 效果图参考:http://hi.b ...
- Spark Streaming 单词计数
Receiver 从数据源接收数据,然后把数据存储在内存中供spark streaming使用,在本地运行spark streaming不能设置master为local或者local[1],此时运行的 ...
- xps9560黑苹果展示
花费了一些时间来安装黑苹果 - - ., 展示一波 更换了DW1820a无线网卡,花费70+ 手上这台笔记本,在安装黑苹果的时候基本没遇见太大的问题,一路顺风顺水. 桌面,程序坞调小放在左侧 极 ...
- day01-html
HTML概述: HTML: Hyper Text Markup Language 超文本标记语言 超文本: 比普通文本功能更加强大,可以添加各种样式 标记语言: 通过一组标签.来对内容进行描述. &l ...
- popen, pclose - process I/O
SYNOPSIS #include <stdio.h> FILE *popen(const char *command, const char *type); int pclose(FIL ...
- centos误删除文件如何恢复
当意识到误删除文件后,切忌千万不要再频繁写入了,否则你的数据恢复的数量将会很少. 而我们要做的是,第一时间把服务器上的服务全部停掉,直接killall 进程名 或者 kill -9 pid . 然后把 ...
- 利用sql语句建立全国省市区三级数据库
一.创建数据库zone CREATE DATABASE IF ONT EXISTS zone; 二.建立省级表并增加数据 DROP TABLE IF EXISTS `provinces`; CREAT ...
- Redis安装配置以及开机启动
1.下载源码,解压缩后编译源码. $ wget http://download.redis.io/releases/redis-2.8.3.tar.gz $ .tar.gz $ cd redis- ...
- HttpClientUtil工具类封装
package com.jd.ng.shiro.utils; import org.apache.http.HttpEntity; import org.apache.http.HttpStatus; ...