Schemas

An XML schema can be used to describe and constrain the elements, attributes, and values within an XML document.

About DTD

A document type definition, or DTD, may be used to constrain the content of an XML file. As a DTD has little bearing on the use of XML in PowerShell, it is considered beyond the scope of this book.

XML schema definitions are saved with an XSD extension. Schema files can be used to validate the content of an XML file.

The following is a simple schema that validates the item namespace:

<?xml version="1.0"?> 
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 
           targetNamespace="http://namespaces/item"     
           xmlns="https://www.w3schools.com" 
           elementFormDefault="qualified"> 
    <xs:element name="rootElement"> 
        <xs:element name="child" type="xs:string" /> 
    </xs:element> 
</xs:schema> 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.184.237