Basic XML Parsing question using System.XML

Joined
Apr 23, 2008
Messages
1
Reaction score
0
Hi,

I hope somebody can help me. I'm currently learning .NET and I'm trying to create my first Office COM add-in in C#, and need a way to parse the output of applicationObject.Selection.WordOpenXML to return only the current selection, as it currently returns an entire OpenXML package.

Put simply, I need to parse the XML string that WordOpenXML creates, and once I see a <w:body> tag, begin writing output to a second string until the closing </w:body> tag.

I think I need to use the System.IO.StringReader within XMLReader, but i'm unsure how to actually find the node I require and then output an unmodified string until the close tag.

Thanks,

Matthew
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top