xpretty - Print XML in Pretty Format


How to use the "xpretty" command to print XML in Pretty Format? I have XMLBeans-2.6.0.zip installed.

✍: FYIcenter.com


If you have XMLBeans-4.5.3.zip installed, you can follow this tutorial to run the "xpretty" command to print XML in Pretty Format:

>cd \fyicenter\xmlbeans-2.6.0

\fyicenter\xmlbeans-2.6.0>.\bin\xpretty schemas\easypo.xsd | more

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://openuri.org/easypo" elementFormDefault="quali
fied" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:po="http://openuri.org/e
  <xs:element name="purchase-order">
        <xs:element name="customer" type="po:customer"/>
        <xs:element name="date" type="xs:dateTime"/>
        <xs:element name="line-item" type="po:line-item" minOccurs="0" maxOccurs="unbounded"/>
        <xs:element name="shipper" type="po:shipper" minOccurs="0" maxOccurs="1"/>
  <xs:complexType name="customer">
      <xs:element name="name" type="xs:string"/>
      <xs:element name="address" type="xs:string"/>
    <xs:attribute name="age" type="xs:int"/>
    <xs:attribute name="moo" type="xs:int" default="100"/>
    <xs:attribute name="poo" type="xs:int" fixed="200"/>
-- More  --


⇒Using Apache XMLBeans in Java Programs

⇒⇒FAQ for Apache XMLBeans JAR Library

2018-01-13, 885👍, 0💬