Converting XML in Pretty Print Format

This section provides a tutorial example on how to convert XML documents into pretty print format using XML Tools Plugin in Notepad++.

As the first test of XML Tools Plugin, let's try to reformat an XML document into a pretty print format:

1. Run "Notepad++" again, You see an empty "Tree View" showing up.

2. Copy the following XML document:

<?xml version="1.0"?>
<user status="active"><!-- This is not a real user. -->
<first_name>John</first_name><last_name>Smith</last_name><address>
<street>1234 Main Road</street><city>Bellville</city></address></user>

3. Paste it into the editing area of Notepad++.

4. Click menu "Plugins" > "XML Tools" > "Pretty print (XML only - with line breaks)" You see the XML document is nicely formatted now:

<?xml version="1.0"?>
<user status="active">
	<!-- This is not a real user. -->
	<first_name>John</first_name>
	<last_name>Smith</last_name>
	<address>
		<street>1234 Main Road</street>
		<city>Bellville</city>
	</address>
</user>

The reformatted XML text looks really good.

Last update: 2016.

Table of Contents

 About This Book

 Introduction of XML (eXtensible Markup Language)

 XML File Syntax

 XML File Browsers

 DOM (Document Object Model) Programming Interface

 SAX (Simple API for XML) Programming Interface

 DTD (Document Type Definition) Introduction

 Syntaxes of DTD Statements

 Validating an XML Document against the Specified DTD Document Type

 XSD (XML Schema Definition) Introduction

 Syntaxes of XSD Statements

 Validating XML Documents Against Specified XML Schemas

 XSL (Extensible Stylesheet Language) Introduction

 XSLT (XSL Transformations) Introduction

 Java Implementation of XSLT

 XPath (XML Path) Language

 XSLT Elements as Programming Statements

 Control and Generate XML Element in the Result

 XML Notepad - XML Editor

XML Tools Plugin for Notepad++

 What Is XML Tools Plugin for Notepad++

 Downloading and Installing Notepad++ with XML Tools

Converting XML in Pretty Print Format

 XSD Validation and Error List

 XSLT Transformation

 Other XML Tools Functions

 XML 1.1 Changes and Parsing Examples

 Outdated Tutorials

 References

 PDF Printing Version