# xml-formatter
**Repository Path**: jwds666/xml-formatter
## Basic Information
- **Project Name**: xml-formatter
- **Description**: 使用更符合人类阅读方式来格式化XML
- **Primary Language**: Java
- **License**: Apache-2.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 1
- **Forks**: 0
- **Created**: 2022-08-01
- **Last Updated**: 2022-08-15
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# xml-formatter
#### 介绍
使用更符合人类阅读方式来格式化XML
```
[
]
```
使上方格式转换为下方格式
```
[
]
```
具体是让XML对齐参数间距。支持默认和排序两种对其方式。
#### 使用
maven引入
```
com.gitee.jwds666
xml-formatter
1.0.1
```
写入到输出流:
```
XMLFormatter xmlFormatter = new DefaultXMLFormatter();
ByteOutputStream bs = new ByteOutputStream();
FormatContext context = xmlFormatter.formattingWriteStream(bs,new FileInputStream("E:\\java\\workSpace\\xml-formatter\\src\\test\\resources\\test.xml"));
```