https://github.com/adamdecaf/xmlq
pretty print and mask xml
https://github.com/adamdecaf/xmlq
masking pii xml
Last synced: 3 months ago
JSON representation
pretty print and mask xml
- Host: GitHub
- URL: https://github.com/adamdecaf/xmlq
- Owner: adamdecaf
- License: apache-2.0
- Created: 2024-02-12T19:50:28.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-04-29T20:35:29.000Z (5 months ago)
- Last Synced: 2025-04-29T21:34:26.994Z (5 months ago)
- Topics: masking, pii, xml
- Language: Go
- Homepage:
- Size: 33.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# xmlq
[](https://pkg.go.dev/github.com/adamdecaf/xmlq/pkg/xmlq)
[](https://github.com/adamdecaf/xmlq/actions)
[](https://codecov.io/gh/adamdecaf/xmlq)
[](https://goreportcard.com/report/github.com/adamdecaf/xmlq)
[](https://raw.githubusercontent.com/adamdecaf/xmlq/master/LICENSE)xmlq is a Go library for pretty printing xml and masking element values. XML inside of CDATA stanzas is also masked and indented.
## Usage
```go
import (
"github.com/adamdecaf/xmlq/pkg/xmlq"
)var (
xmlData io.Reader
)output, err := xmlq.MarshalIndent(xmlData, &Options{
Indent: " ", // two spaces
Masks: []Mask{
{
// 11000179512199001
Name: "Id",
Mask: ShowLastFour,
},
{
// John Doe
Name: "Nm",
Mask: ShowWordStart,
},
},
})
```## Supported and tested platforms
- 64-bit Linux (Ubuntu, Debian), macOS, and Windows
## License
Apache License 2.0 - See [LICENSE](LICENSE) for details.