Home » Categories » Solutions by Business Process » E-Business » XML |
Checking an XML Template |
Article Number: 1841 | Rating: Unrated | Last Updated: Thu, Jun 22, 2023 at 4:48 PM
|
Datafile Software Checking an XML Template A Datafile XML template should itself be a well-formed XML file. To check that a template is "well-formed” (i.e. follows the XML schema rules) you may either use it in an XML definition process, or use a third-party tool. If you use it within an XML process, you’ll be told if there is a structural error in the template. If there is a structural error in the template when using the XML definition process, this is notified to you, and the line where the error occurred is displayed in red (you may need to page down the window to view it). Only one error is highlighted at any one time. Correct it and have another go. If there is another error, that is now highlighted. Alternatively, you can download a command-line tool from the Microsoft website, known as an "XML inference” tool. This tool asks for the pathname (on your system) of the XML file, and then creates an XML schema — a way to describe the construction of an XML file, and hard to understand except by an expert. If it spots any structural errors in the XML file, it tells you. It stops at each error, so you have to correct that one and try again. Once it creates a proper XML schema for you, you know the XML file is well-formed. There is no way, however, to check that the template is factually correct without using it in an appropriate Datafile XML process. The most common errors are the absence of the quote mark at the end of an attribute argument, or leaving off the closing ">” of an element tag, or leaving off the "-->” that denotes the end of a comment. You are told the line and character number in the XML file of the error. But you should bear in mind that the error may be earlier in the file — if you have omitted something — and the error may only have been spotted here because the XML parser is confused by its absence. If you keep Notepad open at the same time (untick the Format/Wordwrap option, and tick the View/Status bar option) you should be able very quickly to spot the error, correct it, save the file, and then have another go with the tool. Note that the XML template wizard included as part of the XML process definition will check for many parsing errors, but will report only the first error encountered. At present the Microsoft XML Inference tool offers the most thorough parsing checks. |
Attachments
![]() There are no attachments for this article.
|
Purchase Ledger Accounts
Viewed 1585 times since Tue, Jul 10, 2012
Tables Distributed
Viewed 1599 times since Tue, Jul 10, 2012
Sales Order Headers (SOH)
Viewed 2518 times since Tue, Jul 10, 2012
Update EAN/Products from Stock
Viewed 1638 times since Thu, Jul 5, 2012
Output XML Orders
Viewed 4013 times since Mon, Jul 9, 2012
Send XML Acknowledgements, Send XML Delivery Notifications
Viewed 1568 times since Thu, Jul 5, 2012
Data Item Names
Viewed 1881 times since Mon, Jul 9, 2012
Application Considerations - Customer Information
Viewed 3098 times since Tue, Jul 10, 2012
Application Considerations - Multiple Companies
Viewed 1444 times since Tue, Jul 10, 2012
Specific Trading Partner Notes - Spicers
Viewed 3949 times since Tue, Jul 10, 2012
|