- Extract text between tags (such as ) in one or many XMLfiles. Extract lines that contain specified tags. Extract text between quotes repeatedly throughout file(s). Save results as a text file.
- setup.exe
- Sobolsoft
- Shareware ($19.99)
- 757 Kb
- Win98, WinME, WinXP, Windows2000, Windows2003, Windows Vista
- This software offers a solution to users who want to convert text files to XMLfiles. To get this software to work, simply drag and drop the files you are working with and click a button to begin conversion.
- setup.exe
- Sobolsoft
- Shareware ($19.99)
- 22.04 Mb
- WinXP, Windows2000, Windows2003, Win98, WinME, Win95
- This software offers a solution to users who want to remove tags from XMLfiles. This versatile tool will save you time by manipulating multiple files at once. There is a feature to save results as a new XML file.
- setup.exe
- Sobolsoft
- Shareware ($19.99)
- 2.77 Mb
- WinXP, WinVista, WinVista x64, Win7 x32, Win7 x64, Win2000, WinOther, Windows2000, Windows2003, Windows 8
- This software offers a solution to users who want to convert one or many XMLfiles into PDFs. The user simply chooses the file/s or an entire folder to be processed before starting the conversion.
- setup.exe
- Sobolsoft
- Shareware ($19.99)
- 9.36 Mb
- WinXP, WinVista, WinVista x64, Win7 x32, Win7 x64, Win2000, WinOther, Windows2000, Windows2003, Windows 8
- Vertically append many XMLfiles. Save result as a new file.
- setup.exe
- Sobolsoft
- Shareware ($19.99)
- 758 Kb
- Win98, WinME, WinXP, Windows2000, Windows2003, Windows Vista
- Find content differences between two specified XMLfiles. Differences are highlighted in red.
- setup.exe
- Sobolsoft
- Shareware ($19.99)
- 838 Kb
- Win98, WinME, WinXP, Windows2000, Windows2003, Windows Vista
- Convert XMLfiles to Excel. Simply browse to the XML file and send the contents to a blank Excel workbook. You must have Excel and Access XP (2002) or higher installed on your machine.
- setup.exe
- Sobolsoft
- Shareware ($19.82)
- 431 Kb
- Windows
- Excel Export to XMLFiles 9.0 is an effective tool which allows you to convert one or several Microsoft Excel files to XML immediatelyWith this software, you can easily select multiple Microsoft Excel documents that you want exported to. ..
- Excel Export to XML Files
- HotHotSoftware
- Trial ($29.95)
- 1.9 Mb
- Windows Server 2003, Windows Vista, Windows 9
- This software offers a solution to users who want to vertically append multiple XMLfiles. Simply add XMLfiles by folder or by drag-and-drop. Results are saved to a new XML file. This software can save you hours by merging large batches of data.
- setup.exe
- Sobolsoft
- Shareware ($19.99)
- 10.41 Mb
- WinXP, Windows2000, Windows2003, Windows Vista, Win98, WinME
- Scene Detector is a utility that will analyze your footage, directly or referenced by Final Cut XML file. If input was a Final Cut XML file, it asks you to choose the clip to work on, then detects the positions of scenes and generates a Final Cut. ..
- SceneDetector-2.6-trial.dmg
- Scene Detector
- Freeware (Free)
- 717 Kb
- Mac OS X 10.4 or later
- Export a block of MS Excel cells to XML. Row and column headers can be used as XML tags. Excel 2000 or higher required.
- setup.exe
- Sobolsoft
- Shareware ($19.99)
- 430 Kb
- Win98, WinME, WinXP, Windows2000, Windows2003
- Export a block of MS Excel cells to XML. Row and column headers can be used as XML tags. Excel 2000 or higher required. This software offers a solution to users who want to create an XML file from the content of a block of MS Excel cells. There are features in the software to customize output: First row in the mouse selection is a header row, First column in the mouse selection is a header column, First row and column in the mouse selection are headers or There are no headers in the mouse selection.
- setup.exe
- Sobolsoft
- Shareware ($19.99)
- 7.2 Mb
- WinXP, Windows2000, Windows2003, Win98, WinME
Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, PHP, Python, Bootstrap, Java and XML. Microsoft Word Document, Office Open XML document: Select file size & download: XLS, XLSX: Microsoft Excell Spreadsheet, Office Open XML worksheet sheet: Select file size & download: PPT, PPTX: Microsoft PowerPoint Presentation, Office Open XML Presentation: Select file size & download: PDF: Portable Document Format: Select file size & download. XML files has became a very popular file format. This is mainly due to its simplicity and mostly beacuse these files are human and machine readable. This article shows an example of XML file reading with Qt. Qt configuration. Before processing any XML file, Qt must be configured. Note: the tags refer to the column names, but you can give them any name you want! For example, instead of LastName use Name. Save the file as schema.xml. Open data-set.xlsx. On the Developer tab, in the XML group, click Source to open the XML Source task pane. To add an XML map, click XML Maps. The XML Maps dialog box appears.
Related:Xml Files Examples - Vba Xml Examples - Xml Code Examples - Xml Schemas Examples - Xml Parsing ExamplesDownload Xml File Free
Pages : 1 | 2 | 3>
This chapter will demonstrate how to write an XML Schema. You will also learn that a schema can be written in different ways.
An XML Document
Let's have a look at this XML document called 'shiporder.xml':
<?xml version='1.0' encoding='UTF-8'?>
<shiporder orderid='889923'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:noNamespaceSchemaLocation='shiporder.xsd'>
<orderperson>John Smith</orderperson>
<shipto>
<name>Ola Nordmann</name>
<address>Langgt 23</address>
<city>4000 Stavanger</city>
<country>Norway</country>
</shipto>
<item>
<title>Empire Burlesque</title>
<note>Special Edition</note>
<quantity>1</quantity>
<price>10.90</price>
</item>
<item>
<title>Hide your heart</title>
<quantity>1</quantity>
<price>9.90</price>
</item>
</shiporder>
<shiporder orderid='889923'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:noNamespaceSchemaLocation='shiporder.xsd'>
<orderperson>John Smith</orderperson>
<shipto>
<name>Ola Nordmann</name>
<address>Langgt 23</address>
<city>4000 Stavanger</city>
<country>Norway</country>
</shipto>
<item>
<title>Empire Burlesque</title>
<note>Special Edition</note>
<quantity>1</quantity>
<price>10.90</price>
</item>
<item>
<title>Hide your heart</title>
<quantity>1</quantity>
<price>9.90</price>
</item>
</shiporder>
The XML document above consists of a root element, 'shiporder', that contains a required attribute called 'orderid'. The 'shiporder' element contains three different child elements: 'orderperson', 'shipto' and 'item'. The 'item' element appears twice, and it contains a 'title', an optional 'note' element, a 'quantity', and a 'price' element.
The line above: xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' tells the XML parser that this document should be validated against a schema. The line: xsi:noNamespaceSchemaLocation='shiporder.xsd' specifies WHERE the schema resides (here it is in the same folder as 'shiporder.xml').
Create an XML Schema
Now we want to create a schema for the XML document above.
We start by opening a new file that we will call 'shiporder.xsd'. To create the schema we could simply follow the structure in the XML document and define each element as we find it. We will start with the standard XML declaration followed by the xs:schema element that defines a schema:
<?xml version='1.0' encoding='UTF-8' ?>
<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'>
..
</xs:schema>
<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'>
..
</xs:schema>
In the schema above we use the standard namespace (xs), and the URI associated with this namespace is the Schema language definition, which has the standard value of http://www.w3.org/2001/XMLSchema.
Next, we have to define the 'shiporder' element. This element has an attribute and it contains other elements, therefore we consider it as a complex type. The child elements of the 'shiporder' element is surrounded by a xs:sequence element that defines an ordered sequence of sub elements:
<xs:element name='shiporder'>
<xs:complexType>
<xs:sequence>
..
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType>
<xs:sequence>
..
</xs:sequence>
</xs:complexType>
</xs:element>
Then we have to define the 'orderperson' element as a simple type (because it does not contain any attributes or other elements). The type (xs:string) is prefixed with the namespace prefix associated with XML Schema that indicates a predefined schema data type:
<xs:element name='orderperson' type='xs:string'/>
Next, we have to define two elements that are of the complex type: 'shipto' and 'item'. We start by defining the 'shipto' element:
<xs:element name='shipto'>
<xs:complexType>
<xs:sequence>
<xs:element name='name' type='xs:string'/>
<xs:element name='address' type='xs:string'/>
<xs:element name='city' type='xs:string'/>
<xs:element name='country' type='xs:string'/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType>
<xs:sequence>
<xs:element name='name' type='xs:string'/>
<xs:element name='address' type='xs:string'/>
<xs:element name='city' type='xs:string'/>
<xs:element name='country' type='xs:string'/>
</xs:sequence>
</xs:complexType>
</xs:element>
With schemas we can define the number of possible occurrences for an element with the maxOccurs and minOccurs attributes. maxOccurs specifies the maximum number of occurrences for an element and minOccurs specifies the minimum number of occurrences for an element. The default value for both maxOccurs and minOccurs is 1!
Now we can define the 'item' element. This element can appear multiple times inside a 'shiporder' element. This is specified by setting the maxOccurs attribute of the 'item' element to 'unbounded' which means that there can be as many occurrences of the 'item' element as the author wishes. Notice that the 'note' element is optional. We have specified this by setting the minOccurs attribute to zero:
<xs:element name='item' maxOccurs='unbounded'>
<xs:complexType>
<xs:sequence>
<xs:element name='title' type='xs:string'/>
<xs:element name='note' type='xs:string' minOccurs='0'/>
<xs:element name='quantity' type='xs:positiveInteger'/>
<xs:element name='price' type='xs:decimal'/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType>
<xs:sequence>
<xs:element name='title' type='xs:string'/>
<xs:element name='note' type='xs:string' minOccurs='0'/>
<xs:element name='quantity' type='xs:positiveInteger'/>
<xs:element name='price' type='xs:decimal'/>
</xs:sequence>
</xs:complexType>
</xs:element>
We can now declare the attribute of the 'shiporder' element. Since this is a required attribute we specify use='required'.
Note: The attribute declarations must always come last:
<xs:attribute name='orderid' type='xs:string' use='required'/>
Here is the complete listing of the schema file called 'shiporder.xsd':
<?xml version='1.0' encoding='UTF-8' ?>
<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'>
<xs:element name='shiporder'>
<xs:complexType>
<xs:sequence>
<xs:element name='orderperson' type='xs:string'/>
<xs:element name='shipto'>
<xs:complexType>
<xs:sequence>
<xs:element name='name' type='xs:string'/>
<xs:element name='address' type='xs:string'/>
<xs:element name='city' type='xs:string'/>
<xs:element name='country' type='xs:string'/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name='item' maxOccurs='unbounded'>
<xs:complexType>
<xs:sequence>
<xs:element name='title' type='xs:string'/>
<xs:element name='note' type='xs:string' minOccurs='0'/>
<xs:element name='quantity' type='xs:positiveInteger'/>
<xs:element name='price' type='xs:decimal'/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name='orderid' type='xs:string' use='required'/>
</xs:complexType>
</xs:element>
</xs:schema>
<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'>
<xs:element name='shiporder'>
<xs:complexType>
<xs:sequence>
<xs:element name='orderperson' type='xs:string'/>
<xs:element name='shipto'>
<xs:complexType>
<xs:sequence>
<xs:element name='name' type='xs:string'/>
<xs:element name='address' type='xs:string'/>
<xs:element name='city' type='xs:string'/>
<xs:element name='country' type='xs:string'/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name='item' maxOccurs='unbounded'>
<xs:complexType>
<xs:sequence>
<xs:element name='title' type='xs:string'/>
<xs:element name='note' type='xs:string' minOccurs='0'/>
<xs:element name='quantity' type='xs:positiveInteger'/>
<xs:element name='price' type='xs:decimal'/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name='orderid' type='xs:string' use='required'/>
</xs:complexType>
</xs:element>
</xs:schema>
Divide the Schema
The previous design method is very simple, but can be difficult to read and maintain when documents are complex.
The next design method is based on defining all elements and attributes first, and then referring to them using the ref attribute.
Here is the new design of the schema file ('shiporder.xsd'):
<?xml version='1.0' encoding='UTF-8' ?>
<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'>
<!-- definition of simple elements -->
<xs:element name='orderperson' type='xs:string'/>
<xs:element name='name' type='xs:string'/>
<xs:element name='address' type='xs:string'/>
<xs:element name='city' type='xs:string'/>
<xs:element name='country' type='xs:string'/>
<xs:element name='title' type='xs:string'/>
<xs:element name='note' type='xs:string'/>
<xs:element name='quantity' type='xs:positiveInteger'/>
<xs:element name='price' type='xs:decimal'/>
<!-- definition of attributes -->
<xs:attribute name='orderid' type='xs:string'/>
<!-- definition of complex elements -->
<xs:element name='shipto'>
<xs:complexType>
<xs:sequence>
<xs:element ref='name'/>
<xs:element ref='address'/>
<xs:element ref='city'/>
<xs:element ref='country'/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name='item'>
<xs:complexType>
<xs:sequence>
<xs:element ref='title'/>
<xs:element ref='note' minOccurs='0'/>
<xs:element ref='quantity'/>
<xs:element ref='price'/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name='shiporder'>
<xs:complexType>
<xs:sequence>
<xs:element ref='orderperson'/>
<xs:element ref='shipto'/>
<xs:element ref='item' maxOccurs='unbounded'/>
</xs:sequence>
<xs:attribute ref='orderid' use='required'/>
</xs:complexType>
</xs:element>
</xs:schema>
<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'>
<!-- definition of simple elements -->
<xs:element name='orderperson' type='xs:string'/>
<xs:element name='name' type='xs:string'/>
<xs:element name='address' type='xs:string'/>
<xs:element name='city' type='xs:string'/>
<xs:element name='country' type='xs:string'/>
<xs:element name='title' type='xs:string'/>
<xs:element name='note' type='xs:string'/>
<xs:element name='quantity' type='xs:positiveInteger'/>
<xs:element name='price' type='xs:decimal'/>
<!-- definition of attributes -->
<xs:attribute name='orderid' type='xs:string'/>
<!-- definition of complex elements -->
<xs:element name='shipto'>
<xs:complexType>
<xs:sequence>
<xs:element ref='name'/>
<xs:element ref='address'/>
<xs:element ref='city'/>
<xs:element ref='country'/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name='item'>
<xs:complexType>
<xs:sequence>
<xs:element ref='title'/>
<xs:element ref='note' minOccurs='0'/>
<xs:element ref='quantity'/>
<xs:element ref='price'/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name='shiporder'>
<xs:complexType>
<xs:sequence>
<xs:element ref='orderperson'/>
<xs:element ref='shipto'/>
<xs:element ref='item' maxOccurs='unbounded'/>
</xs:sequence>
<xs:attribute ref='orderid' use='required'/>
</xs:complexType>
</xs:element>
</xs:schema>
Using Named Types
The third design method defines classes or types, that enables us to reuse element definitions. This is done by naming the simpleTypes and complexTypes elements, and then point to them through the type attribute of the element.
Here is the third design of the schema file ('shiporder.xsd'):
<?xml version='1.0' encoding='UTF-8' ?>
<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'>
<xs:simpleType name='stringtype'>
<xs:restriction base='xs:string'/>
</xs:simpleType>
<xs:simpleType name='inttype'>
<xs:restriction base='xs:positiveInteger'/>
</xs:simpleType>
<xs:simpleType name='dectype'>
<xs:restriction base='xs:decimal'/>
</xs:simpleType>
<xs:simpleType name='orderidtype'>
<xs:restriction base='xs:string'>
<xs:pattern value='[0-9]{6}'/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name='shiptotype'>
<xs:sequence>
<xs:element name='name' type='stringtype'/>
<xs:element name='address' type='stringtype'/>
<xs:element name='city' type='stringtype'/>
<xs:element name='country' type='stringtype'/>
</xs:sequence>
</xs:complexType>
<xs:complexType name='itemtype'>
<xs:sequence>
<xs:element name='title' type='stringtype'/>
<xs:element name='note' type='stringtype' minOccurs='0'/>
<xs:element name='quantity' type='inttype'/>
<xs:element name='price' type='dectype'/>
</xs:sequence>
</xs:complexType>
<xs:complexType name='shipordertype'>
<xs:sequence>
<xs:element name='orderperson' type='stringtype'/>
<xs:element name='shipto' type='shiptotype'/>
<xs:element name='item' maxOccurs='unbounded' type='itemtype'/>
</xs:sequence>
<xs:attribute name='orderid' type='orderidtype' use='required'/>
</xs:complexType>
<xs:element name='shiporder' type='shipordertype'/>
</xs:schema>
<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'>
<xs:simpleType name='stringtype'>
<xs:restriction base='xs:string'/>
</xs:simpleType>
<xs:simpleType name='inttype'>
<xs:restriction base='xs:positiveInteger'/>
</xs:simpleType>
<xs:simpleType name='dectype'>
<xs:restriction base='xs:decimal'/>
</xs:simpleType>
<xs:simpleType name='orderidtype'>
<xs:restriction base='xs:string'>
<xs:pattern value='[0-9]{6}'/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name='shiptotype'>
<xs:sequence>
<xs:element name='name' type='stringtype'/>
<xs:element name='address' type='stringtype'/>
<xs:element name='city' type='stringtype'/>
<xs:element name='country' type='stringtype'/>
</xs:sequence>
</xs:complexType>
<xs:complexType name='itemtype'>
<xs:sequence>
<xs:element name='title' type='stringtype'/>
<xs:element name='note' type='stringtype' minOccurs='0'/>
<xs:element name='quantity' type='inttype'/>
<xs:element name='price' type='dectype'/>
</xs:sequence>
</xs:complexType>
<xs:complexType name='shipordertype'>
<xs:sequence>
<xs:element name='orderperson' type='stringtype'/>
<xs:element name='shipto' type='shiptotype'/>
<xs:element name='item' maxOccurs='unbounded' type='itemtype'/>
</xs:sequence>
<xs:attribute name='orderid' type='orderidtype' use='required'/>
</xs:complexType>
<xs:element name='shiporder' type='shipordertype'/>
</xs:schema>
The restriction element indicates that the datatype is derived from a W3C XML Schema namespace datatype. So, the following fragment means that the value of the element or attribute must be a string value:
The restriction element is more often used to apply restrictions to elements. Look at the following lines from the schema above:
What Programs Open Xml Files
<xs:simpleType name='orderidtype'>
<xs:restriction base='xs:string'>
<xs:pattern value='[0-9]{6}'/>
</xs:restriction>
</xs:simpleType>
<xs:restriction base='xs:string'>
<xs:pattern value='[0-9]{6}'/>
</xs:restriction>
</xs:simpleType>
Sample Xml
This indicates that the value of the element or attribute must be a string, it must be exactly six characters in a row, and those characters must be a number from 0 to 9.