XML Split of a Large file

前端 未结 10 1259
心在旅途
心在旅途 2021-01-04 00:41

I have a 15 GB XML file which I would want to split it .It has approximately 300 Million lines in it . It doesn\'t have any top nodes which are interdependent .Is there any

10条回答
  •  被撕碎了的回忆
    2021-01-04 00:49

    In what way do you need to split it? It's pretty easy to write code using XmlReader.ReadSubTree. It will return a new xmlReader instance against the current element and all its child elements. So, move to the first child of the root, call ReadSubtree, write all those nodes, call Read() using the original reader, and loop until done.

提交回复
热议问题