edit xml file XML tools

Use notepad++ XML Tools to edit XML files

If you have a XML file which is large and wanted to format or edit XML files using notepad++ then follow the steps below. This plugin is based on libXML2.

XML Tools to edit XML files

1. First download and install latest notepad++ if you don’t have.

2. Start notepad++ application and open Plugins Admin as shown below

edit xml plugin admin

3. Search “XML Tools” using search box and select that plugin as shown in the screenshot and hit “Install” button

edit xml XML tools

4. Once you install the plugin, you could see the following menu items under Plugins -> XML Tools

edit xml tools menu

That’s all you are done.

XML Tools Plugin Features

The following are the features of this plugin

  • XML Syntax check
  • Schema (XSD) + DTD Validation
  • Tag auto close
  • Pretty print
  • Linarize XML
  • Current XML path
  • XSL Transformation
  • XML to Text , Text to XML
  • Comment/ Uncomment

Now let us see how to  edit XML files using notepad++ XML Tools plugin.

For instance, let’s say you have decided to write/read XML string to/from NOSQL document db like below. You may wanted to format it either online or using some tool.

"<?xml version="1.0" encoding="UTF-8"?><request>  <info description="info" name="test_tag_usecase" prefix="gfkl" service="iptransit" tags="ryry,gjf,gfj" version="0.3">    <attributes>      <reference description="" group="" immutable="false" mandatory="firstActivity" shadow="false" syntacticType="xs:string" type="input"/>    </attributes>  </info>  <activities>    <activity id="firstActivity">      <sequence_number>1</sequence_number>      <process_subtype>automatic</process_subtype>      <process_type>firstActivity</process_type>      <activity_type>internal</activity_type>      <description/>      <response_type>synchronous</response_type>      <action/>      <fields_immutable/>      <exception/>      <notification/>      <next_sequence_number>0</next_sequence_number>    </activity>  </activities>  <files/>  <comments/></request>"

Copy and paste the above XML string in the notepad++

Then go to Plugins -> XML Tools and select “Pretty print (LibXML)”, you could see the following output

<?xml version="1.0" encoding="UTF-8"?>
<request>
  <info description="info" name="test_tag_usecase" prefix="gfkl" service="iptransit" tags="ryry,gjf,gfj" version="0.3">
    <attributes>
      <reference description="" group="" immutable="false" mandatory="firstActivity" shadow="false" syntacticType="xs:string" type="input"/>
    </attributes>
  </info>
  <activities>
    <activity id="firstActivity">
      <sequence_number>1</sequence_number>
      <process_subtype>automatic</process_subtype>
      <process_type>firstActivity</process_type>
      <activity_type>internal</activity_type>
      <description/>
      <response_type>synchronous</response_type>
      <action/>
      <fields_immutable/>
      <exception/>
      <notification/>
      <next_sequence_number>0</next_sequence_number>
    </activity>
  </activities>
  <files/>
  <comments/>
</request>

Now you can start editing the XML.

Further Learning

References

guest
1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Nutan Pawar
Nutan Pawar
3 months ago

it worked!!

Thank you