How can i update/edit the file in the middle?
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Tuesday, July 13, 2004 04:53 AM


I need to open a XML file and find some pattern. If i find that patteren i need to update or edit thatpattern ( mostly XML tags). Is there any way of doing that?

Re: How can i update/edit the file in the middle?

Posted By:   Krishna_Adavi  
Posted On:   Tuesday, July 20, 2004 01:59 PM

i think you can use xpath to find the specific pattern and then edit the file. After this apply the actual parse processing to that file. If you use DOM or something else, it remembers the file and you cannot edit. Just try this.

Re: How can i update/edit the file in the middle?

Posted By:   Benoit_Quintin  
Posted On:   Tuesday, July 13, 2004 07:25 AM

Maybe you can look at SAX Parsing combined with XPath. Or Digester... Or maybe StreamTokenizer. Otherwise you could always read the whole file, then search with or without RegEx.
About | Sitemap | Contact