none
Word XML Document Question RRS feed

  • Question

  • Hi everybody,

    I am working in a new project which will act as a letter parsing engine for some commands entered in these letters (Word Documents) .. these word documents are exported from MS Word into XML Document which is marked using Word Processing ML.

    My question is: Is there anything in VSTools for Office that helps me deal (read, parse, write) in these word documents that are saved as XML and written in WordProcessingML? or should I use normal System.XML namespace to work with these files?

    Thanks

    Khaled Hussein

    Tuesday, January 31, 2006 11:14 AM

Answers

  • Hi,

    VSTO does not have any tools for working with the WordML directly. You will need to use the System.XML classes for that.

    Thanks
    Paul Stubbs
    Program Manager

    Tuesday, January 31, 2006 4:52 PM

All replies

  • Hi,

    VSTO does not have any tools for working with the WordML directly. You will need to use the System.XML classes for that.

    Thanks
    Paul Stubbs
    Program Manager

    Tuesday, January 31, 2006 4:52 PM
  • Thanks Paul,

    Yes I figured thsi out and luckily I found the solution to do this searching in an XML file, using the XPath Queries...

    So using this line of code, you can search for any text in the XML document. This line selects all the nodes called "nodeName" that contains the text stored in txt2Search.

     string xPathQuery = "//nodeName[contains(.," + "\"" + txt2Search + "\")]";

    Thanks again

    Khaled Hussein

    Tuesday, January 31, 2006 7:47 PM