Good option for editing XML / replacing

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:

? (EDIT: , , , , " " "/".)

+3
3

, SAX. , ( ) . , .

+2

?

XML, XML- , ​​ BDB XML ( API ++). XQuery, ..

TinyXML, . , , .

+1

? 5MB , RAM.

DOM XPath, , , , SAX . SAX , , , SAX - , , DOM, , , .

Echo . , , XML. , DOM/XPath rip-and-replace .

0

All Articles