Basic XML Parsing question using System.XML

Discussion in 'XML' started by Originlabs, Apr 23, 2008.

  1. Originlabs

    Originlabs

    Joined:
    Apr 23, 2008
    Messages:
    1
    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
    Originlabs, Apr 23, 2008
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Engineer
    Replies:
    6
    Views:
    599
    Jeremy Bowers
    May 1, 2005
  2. rrr@ronadam.com
    Replies:
    0
    Views:
    412
    rrr@ronadam.com
    May 2, 2005
  3. Geo Cooper

    basic xml parsing question

    Geo Cooper, Mar 26, 2009, in forum: Ruby
    Replies:
    3
    Views:
    107
    Mark Thomas
    Mar 27, 2009
  4. John Levine
    Replies:
    0
    Views:
    711
    John Levine
    Feb 2, 2012
  5. Erik Wasser
    Replies:
    5
    Views:
    416
    Peter J. Holzer
    Mar 5, 2006
Loading...

Share This Page