Google Community
Latest Forums Rules Resources
Custom Search

Go Back   Google Community > The Community > Introduce Yourself

GoogleCommunity Sponsor
Cirtex Hosting
Use coupon "forum" for 50% Off!

Reply
 
LinkBack Thread Tools Display Modes
Old 05-07-2008, 04:06 AM   #1 (permalink)
Noogle
 
Join Date: May 2008
Posts: 0
Thanks: 0
Thanked 0 Times in 0 Posts
sathish4mailing is on a distinguished road
Post Doubt in Reading Xml

Hi Friends,

i was write the two java program.

1.xmlread.java [ its a sample program ]
2.XmlFileRead.java [ its my project code. main program ]


i m trying to read the xml file .its working fine in xmlread.java file.but since itsnt woking in XmlFileRead.java. i dont know why its not working.i have placed the below code . Anybody tell me wats the problem.whether both code shold be similar . nothing is differ. Its very urgent ...


XML
<?xml version="1.0" encoding="UTF-8"?><Workset><GeneralInformation DataSetUsed="C:\ocr\CrabbyyDE\bin\resources\Artsyl 03-03-08\claimaction.frm" TrialDate="2008-03-06T16:33:33" TrialExecutor="Crabbyy DE v1.7.6.2" TrialName=""><Timing EndTime="2008-03-06T16:33:57" StartTime="2008-03-06T16:33:33" /><!--RUNNING ACE v2.16.16--><!--LOADED CFG FILE:C:/OCR/ACETest/Configs/ACEdefine-Universal.xml--><!--LOADED CFG FILE:C:/OCR/ACETest/Configs/ACEconfig-Aggressive.xml--><!--LOADED CFG FILE:C:/OCR/ACETest/Configs/ACEconfig-Universal.xml--><!--LOADED CFG FILE:C:/OCR/ACETest/Configs/ACEconfig-FISERV01.xml--></GeneralInformation><InputSource SourceName="ABBYY"></InputSource><Batch BatchIdentifier="01300420"><Document DocumentIdentifier="8360716551082"><Field FieldName="B0b_Agent_Full_Address"><MasterCapture CapturedValue="P 0 BOX 30985 SALTLAKECITY" ConfidenceScore="100" ConfidenceString="100,W,100,W,100,100,100,W,100,10 0,100,100,100,W,100,100,100,100,100,100,100,100,10 0,100,100,100" DataType="TEXT" Length="26"><Coordinates><ROI Height="83" Left="1561" Top="154" Width="319" /><Char Height="0" Left="0" Top="0" Width="0" /><Char Height="0" Left="0" Top="0" Width="0" /><Char Height="0" Left="0" Top="0" Width="0" /><Char Height="0" Left="0" Top="0" Width="0" /><Char Height="0" Left="0" Top="0" Width="0" /><Char Height="0" Left="0" Top="0" Width="0" /><Char Height="0" Left="0" Top="0" Width="0" /><Char Height="0" Left="0" Top="0" Width="0" /><Char Height="0" Left="0" Top="0" Width="0" /><Char Height="0" Left="0" Top="0" Width="0" /><Char Height="0" Left="0" Top="0" Width="0" /><Char Height="0" Left="0" Top="0" Width="0" /><Char Height="0" Left="0" Top="0" Width="0" /><Char Height="0" Left="0" Top="0" Width="0" /><Char Height="0" Left="0" Top="0" Width="0" /><Char Height="0" Left="0" Top="0" Width="0" /><Char Height="0" Left="0" Top="0" Width="0" /><Char Height="0" Left="0" Top="0" Width="0" /><Char Height="0" Left="0" Top="0" Width="0" /><Char Height="0" Left="0" Top="0" Width="0" /><Char Height="0" Left="0" Top="0" Width="0" /><Char Height="0" Left="0" Top="0" Width="0" /><Char Height="0" Left="0" Top="0" Width="0" /><Char Height="0" Left="0" Top="0" Width="0" /><Char Height="0" Left="0" Top="0" Width="0" /><Char Height="0" Left="0" Top="0" Width="0" /></Coordinates></MasterCapture></Field></Document></Batch></Workset>

Java Code

OcrTmpPath = "R:\\datacenter\\UHC\\grpb\\data\\07166\\8366f0z2b l\\OCR_8366f0z2bl.xml";
OcrDCN = "8360716551082";


public String OcrValMethod(String OcrTmpPath ,String OcrDCN) throws TransformerException
{

File OcrFile = new File(OcrTmpPath);
String rtnVal =null;

try {
DocumentBuilder OcrBuilder = DocumentBuilderFactory.newInstance().newDocumentBu ilder();
if(OcrFile.exists())
{
Document OcrDoc = OcrBuilder.parse(OcrFile);

NodeList OcrNode = XPathAPI.selectNodeList(OcrDoc,"Workset/Batch/Document[@DocumentIdentifier=\""+OcrDCN+"\"]");
rtnVal = OcrNode.item(0).toString();
System.out.println("ITEM .. "+OcrNode.item(0));
JOptionPane.showMessageDialog(null,"Hello World ..");

}

} catch (FactoryConfigurationError e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SAXException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (ParserConfigurationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
sathish4mailing is offline   Reply With Quote
 
Sponsored Links
Reply
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
A BIG DOUBT arun.v Introduce Yourself 10 10-18-2006 11:22 PM
Doubt on Google PR sck4784 Search Engine Optimization Forum 5 10-03-2006 07:52 AM
a doubt playvibes Business, Investing, Finance and Money 1 09-14-2005 04:34 PM
Doubt?!! laxmikrsnan GC Announcements 3 08-11-2005 04:12 PM
a doubt! Gooooogler General Discussion 10 06-04-2005 02:54 PM


All times are GMT -8. The time now is 10:27 AM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
© 2004–2007 Google Community