Your input file is in xml format, why don't you use Xpath:

// from 
http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/xpath/package-summary.html

XPath xpath = XPathFactory.newInstance().newXPath();
String expression = "/T_CATALOG_ITEM";
InputSource inputSource = new InputSource("catalog.xml");
NodeSet nodes = (NodeSet) xpath.evaluate(expression, inputSource, 
XPathConstants.NODESET);

Regards,


Arnaud.

Arun wrote on 05/10/2007 21:46:
> Hi,
> 
> I was using some hardcoded values for testing the pattern, but when I used
> the actual input file, the pattern fails to match.
> Please help. The program is for generating insert statement for another
> table since my old table column name has changed.This java
> program is the migration tool. I have attached the code and the regexp
> match. Basically it matches for  (<T_CATALOG_ITEM>)(.*?)(<T
> _CATALOG_ITEM>). The program TableMigrator reads an xml file
> catalog.xmlfile and matches it with this pattern.
> I have also added the files in 4shared.com as z1.zip. Please help
> username : [EMAIL PROTECTED]
> password  : 123456
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to