I have a huge (100k + lines, 5MB +) XML that acts as a database for my C ++ application. The XML structure is fairly straightforward, for example, it has fragments:
<foo>
<bar prop="true"/>
<baz>blah</baz>
</foo>
The nesting of tags at several levels is deep, and there are many elements with several properties. What is a good way to find and replace pieces of such a file? For example, suppose the aforementioned section is repeated several tens of times, and in each fragment the tag value <baz>is different. I would like to make such changes as:
- Setting all values contained in the tag
<baz>to the specified value. - Delete chunks containing specific values
- Etc.
So far, I have learned about the following methods for this:
/: , , . , , , . .
RegExes. . , : http://blogs.msdn.com/b/vseditor/archive/2004/08/12/213770.aspx. , , , .
Parser Save: XML Xerces XML DOM- ( - XML), XML-, . , , , , RegExes.
?
(EDIT: , , , , " " "/".)