How do I go about.New to xml.Using Xerces parser.Plz help.Thanx in advance.
You need to implement the servlet's doPost(...) method for handling a HTTP POST request, locate the file based on the filename returned by HttpServletRequest#getParameter("xmlfile"), and parse the file using either the SAX or DOM API. IBM DeveloperWorks has a tutorial for validating against a schema using Xerces (see the link above).
Write a Servlet using Java 1.3.x (but NOT Java 1.4) to read an xml file from the virtual directory /test and validate it as follows:
- The Servlet should be called TestParser
- the filename is passed in the parameter xmlfile using the post method
e.g xmlfile will have a value of file1.xml
- the file must be validated against the XML Schema –
...any validation errors should be EMAILED from the server to the account email@example.com, the from address should be firstname.lastname@example.org, the subject should be “XML Parser Error in File: “+filename
- The body should contain details of the error, including the line at which the error occurred and the XML file that failed to validate should be attached to the email.
This part is really about JDBC so you should post it separately to our JDBC forum.
Write a Servlet using Java 1.3.x (but NOT Java 1.4) called DBTable to do the following: ...
Its simple plain english.Lasse r u listening.
Is it appropriate to use "System.exit( 0 ) ; "?
Do you run the risk of shutting the server down?
How do I pass the order using the argument??what will g refer to??
when i run the program
java filename xmlfile ?
Now for legaladdress node I have to again do the same way as I did for tradingaddress.But then the schema will grow in size.Is there any other way out.
You can download Apache James for free. Download, unpack, double-click run.bat...
I dont have access to an smtp server.
I just gave you a list of the mistakes in the schema document you emailed me. Once you've fixed those, the schema should be fine.
Schemas.Just check and let me know the errors.
The easiest way to do this would be to make the "iatanumber" field a primary key. Then, trying to insert a record with an existing iatanumber will throw an exception, which you can catch and append into the list of errors (which you will later add into the attachment).
Insert parts where duplicates are not allowed
I don't get it. What do you mean by "retrieving the table name"? Shouldn't you know the table name already? If this is something specific to MS Access then I'm afraid I can't help with that.
Now when i do a String str=request.getParameter("tt") i will get the path.Now from this path i need to retrieve the table name.
I do execute the query rs.executeQuery("drop table agents") but get an exception that No resultset was produced.
Now I will have to keep a flag boolean value coz the next time I execute it should not drop this agents table.This is the correct way or any other way out.
But after re - running the program how will I get the total number of accepted and rejected records?
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koophttps://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton