How to parse an XML file with RapidXml

前端 未结 4 1557
情话喂你
情话喂你 2020-12-25 14:58

I have to parse an XML file in C++. I was researching and found the RapidXml library for this.

I have doubts about doc.parse<0>(xml).

Can

4条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-25 15:48

    The manual tells us:

    function xml_document::parse

    [...] Parses zero-terminated XML string according to given flags.

    RapidXML leaves loading the character data from a file to you. Either read the file into a buffer, like anno suggested or alternatively use some memory mapping technique. (But look up parse_non_destructive flag first.)

提交回复
热议问题