Skip to content

Karalix/Dumb-Xml-Writer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dumb-Xml-Writer

A simple tiny library to quickly obtain XML elements as String in JAVA

Element e = new Element("root") ;
e.addAttribute("href", "/Converstaions/aaa");
Element e2 = new Element("p", e);
e2.addTextChild("Coucou le monde !");
Element e3 = new Element("vide");
e3.addAttribute("lol", "3");
e.addChild(e3);
e.addTextChild("Yo mec.");
e.toString()

will give

<root href="/Converstaions/aaa">
    Yo mec.
    <p>
        Coucou le monde !
    </p>
    <vide lol="3"/>
</root>

or instead if using e.toString(true)

<root href="/Converstaions/aaa">    Yo mec.    <p>        Coucou le monde !    </p><vide lol="3"/></root>

This simple library is to enable me to generate good enough XML in a simple way.

Any comments welcome.

About

A simple tiny java library to quickly create XML elements and get them as String.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages