1.1.2 • Published 10 years ago

xmlrm v1.1.2

Weekly downloads
1
License
ISC
Repository
github
Last release
10 years ago

xml-remover

Command line XML elements remover

Can be lauch on file/folder , if folder , will check which one is xml.

Install

npm i -g xml-remover

Usage

Help

xmlrm —help

Example

xmlrm -i /Path/To/File.xml -b span

Will remove all span from File.xml

xmlrm -i /Path/To/Folder/ -b span

Attention : to work with folder don't forget "/" after folder name !

Params

--input, -i , Input folder or XML file, Required (null by default)

--balise, -b, Remove all balises (ex: -b span) (null by default)

--attribut, -a , Remove all asked attributs (ex: -a type) (null by default)

--method, -m (See methods values below) (null by default)

       and -> Remove balises & attributs (Enable by default)
       bwa -> Remove balises with attribut name
       aib -> Remove attribut in balises 
       bwoa -> Remove balises withOut attribut name
       
       

Specific sub item

To point on a specific subitem just use syntax -b "body div element"

Complexe example

  • xmlrm -i /Path/To/folder/ -b title -a type -m bwa

    Will remove all <title> with a "type" attribute

  • xmlrm -i /Path/To/folder/ -b title -a type::value -m bwa

    Will remove all <title> with a "type" attribute that have a "value" value

  • xmlrm -i /Path/To/file.xml -b title -a type -m aib

    Will remove all "type" attribute in <title> balises

  • xmlrm -i /Path/To/file.xml -b "body title" -a type::x,,z -m bwoa

    Will remove all <title> in body with a "type" attribute that does not have a "x" or a "z" values for example <title type="y"> will be removed

1.1.2

10 years ago

1.1.1

10 years ago

1.1.0

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago