Hello,
I have a question. Here is simple SAX Java example: http://www.roseindia.net/xml/sax/EmployeeDetails.shtml
The XML file contains Employees (with Emp_Id, Emp_Name and Emp_E-mail). I have situation when for example Emp_Name element is missing. Is it possible find out in Java console please?
I tried this:
But this solution writes "Name is missing" every time. Thank you very much, best regards TomasCode:if (name){ System.out.println("Name: " + str); name = false; } else { System.out.println("Name is missing"); }


Reply With Quote
If the element is missing, isn't is supposed to print that out?




Bookmarks