SAX - missing element in XML document
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 Tomas
System.out.println("Name: " + str);
name = false;
System.out.println("Name is missing");
If the element is missing, isn't is supposed to print that out?
I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
Please use [Code]your code goes in here[/Code] tags when posting code.
Before posting your question, did you look here
Got a question on Linux? Visit our Linux sister site.
Modifications Required For VB6 Apps To Work On Vista
I need save the XML data to CSV file and missing element = null value
By irenesoundarya in forum XML
Last Post: 09-08-2008, 12:53 PM
By river22_34 in forum XML
Last Post: 02-03-2008, 06:12 AM
By HSIN NING in forum Web
Last Post: 08-21-2000, 01:21 AM
By HSIN NING in forum XML
Last Post: 08-21-2000, 01:17 AM
Tags for this Thread
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL