Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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


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<>'"&}
```