.net - Cannot read the value from Numbering bullets/lists when parsing the output XML from a .docx file in C# -
i have .docx this:
using openxml can text file, but, not able parenthetical remark (the letter parentheses ")"), how can this?
this output xml part:
<w:p w:rsidr=\"00785318\" w:rsidrdefault=\"00785318\" w:rsidp=\"00785318\"> <w:ppr> <w:pstyle w:val=\"bodytext\"/> <w:numpr> <w:ilvl w:val=\"0\"/> <w:numid w:val=\"1\"/> </w:numpr> </w:ppr> <w:r> <w:t>something a</w:t> </w:r> </w:p> <w:p w:rsidr=\"00785318\" w:rsidrdefault=\"00785318\" w:rsidp=\"00785318\"> <w:ppr> <w:pstyle w:val=\"bodytext\"/> <w:numpr> <w:ilvl w:val=\"0\"/> <w:numid w:val=\"1\"/> </w:numpr> </w:ppr> <w:r> <w:t>something b.</w:t> </w:r> </w:p> <w:p w:rsidr=\"00785318\" w:rsidrdefault=\"00785318\" w:rsidp=\"00785318\"> <w:ppr> <w:pstyle w:val=\"bodytext\"/> <w:numpr> <w:ilvl w:val=\"0\"/> <w:numid w:val=\"1\"/> </w:numpr> </w:ppr> <w:r> <w:t>something c</w:t> </w:r> </w:p> and c# code:
using (wordprocessingdocument wordprocessingdocument = wordprocessingdocument.open(fileinfo.fullname, false)) { string wordprocessingdocumenttext; using (streamreader streamreader = new streamreader(wordprocessingdocument.maindocumentpart.getstream())) { wordprocessingdocumenttext = streamreader.readtoend(); } } any suggestions? in advance!
Comments
Post a Comment