Fatal eror while parsing XML using XPath in Java

increase-views

New Member
I want to parse a XML file. It throws the Exception while creating object: \[code\]Document doc = builder.parse("Response.xml");\[/code\]Exception:\[code\][Fatal Error] Response.xml:63:67: The prefix "UDF" for element "UDF:RTSIDUDF.LIST" is not bound.Exception in thread "main" org.xml.sax.SAXParseException: The prefix "UDF" for element "UDF:RTSIDUDF.LIST" is not bound. at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:249) at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:284) at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:180) at tallyreqandresponse.Ledger.main(Ledger.java:38)Java Result: 1\[/code\]Sample xml Code: \[code\] <A> <LANGUAGENAME.LIST> <NAME.LIST TYPE="String"> <NAME>ABC India (P) Ltd.,</NAME> </NAME.LIST> <LANGUAGEID TYPE="Number"> 1033</LANGUAGEID> <UDF:RTSIDUDF.LIST DESC="`RTSIDUDF`" ISLIST="YES" TYPE="Number"> <UDF:RTSIDUDF DESC="`RTSIDUDF`"> 1387</UDF:RTSIDUDF> </UDF:RTSIDUDF.LIST> </LANGUAGENAME.LIST> </A>\[/code\]Kindly help me out of it.Edit Note: Added LANGUAGENAME.LIST Opening tag
 
Back
Top