HTML and CSS Reference
In-Depth Information
• Check that the XML iles contain speciic XML tags. Although such a validation can't
replace XSD schema validation, it can act as a first-level validation.
• Show a preview of the XML iles being uploaded to the server.
The application that you develop in this section resembles Figure 9-11.
Figure 9-11. An ASP.NET MVC application for uploading XML files
The application lets you select files using a file field control or by dragging them from Windows
Explorer. Once the files are selected, the number of files selected is displayed below the basket along with a
list of file names as links. If you hover over the file names, a short preview (up to 500 characters) of the file
content is displayed in the link's tooltip. When you click the Upload button, all the files are uploaded to the
server and are validated against an XSD schema. If the uploaded XML files don't match the schema
specifications, an error is returned.
The XML file-uploading application works along the same lines as the image-preview application you
developed earlier; hence this section focuses only on the areas that are different. Listing 9-25 shows the
markup of the application's index view.
 
Search WWH ::




Custom Search