Skip to content
Advertisement

Tag: xml-parsing

Read few xml elements only in an efficient way

I want to read only few XML tag values .I have written the below code.XML is big and a bit complex. But for example I have simplified the xml . Is there any other efficient way to solve it ?I am using JAVA 8 Answer Using XPAth and passing a specific expression to get the desired element Result: 1/1/2014 To

XML to java object using jaxb Unmarshalling namespace

I have below employee.xml which I am trying to convert to Java Object using JAXB. I am getting null value here, please guide me what I am missing here or doing wrong. I am not familiar with JAXB and namespace <employee xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=”http://www.w3.org/2001/XMLSchema” xmlns=”http://schema.cs.csg.com/cs/ib/cpm”> I thing I am missing some annotation or not using it properly. Output: employee.xml Employee.java Department.java

Advertisement