Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dreamtowards/xmlp
A Lightweight XML Manulator in Java.
https://github.com/dreamtowards/xmlp
Last synced: 9 days ago
JSON representation
A Lightweight XML Manulator in Java.
- Host: GitHub
- URL: https://github.com/dreamtowards/xmlp
- Owner: Dreamtowards
- License: apache-2.0
- Created: 2020-07-02T11:49:44.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-07-08T12:00:16.000Z (over 4 years ago)
- Last Synced: 2024-11-06T15:32:17.993Z (about 2 months ago)
- Language: Java
- Homepage:
- Size: 25.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Copyrights Declarations
This is produced From OTS/UtilS Lib. as a Open, Semi-Independent Term.# Getting start
### Create a XML element From existed XML String.
```java
XML nd1 = new XML("Some of Texts");
System.out.println(nd1.toString(0));
System.out.println(nd1.toString()); // default indentFactor: 4.
```
Output:
```
Some of Texts```
### Create a XML element From a InputStream. (String content)
File testxml.xml:
```xml
Some of Text
Some of Text2
And MulLine
&'" In CDATA -only for input.
]]>
```
```java
XML tn2 = new XML(new FileInputStream("testxml.xml"));
System.out.println(tn2.toString(2));System.out.println("attrs: "+tn2.getChildren().get(2).getAttributes());
```
Output:
```
Some of Text
Some of Text2
And MulLine
Some Text <>&'" In CDATA -only for input.
attrs: {tstNs:attr1=valueWithEscp<>'"&}
```