+ Reply to Thread
Results 1 to 1 of 1

XPath.SetValue

  1. #1
    Registered User
    Join Date
    02-15-2012
    Location
    germany
    MS-Off Ver
    Excel 2003
    Posts
    1

    XPath.SetValue

    hi everybody,
    i got a problem with xpath. I want to import Data from an XML-Document into Excel.
    This is how my XML-Document looks like :
    Please Login or Register  to view this content.
    My Problem is that the node "Person" and "Adresse" are in a "1 : n" relationship through the Value of PersNr and so i want to map all "adresse"-nodes to the "Person" it belongs too.
    But all i have archived is to show all "person" and then all "adresse" elements via

    string namespcace = "xmlns:mstns='http://AutorenDataSet.com'";

    Excel.ListObject loHistory = ws.ListObjects.Add(Microsoft.Office.Interop.Excel.XlListObjectSourceType.xlSrcRange, rg.get_Offset(5, 0).get_Resize(2, 5), missing, Excel.XlYesNoGuess.xlGuess, missing);
    loHistory.ListColumns[1].XPath.SetValue(xmlMap, "mstns:PersonenDataSet/mstns:Person/mstns:Vorname", namespcace, missing);
    loHistory.ListColumns[2].XPath.SetValue(xmlMap, "mstns:PersonenDataSet/mstns:Adresse/mstns:Stadt", namespcace, missing);
    ...for the all compontents of "Person" and "Adresse" i want to show

    i really would appreciate help

    Edit : do u need more informations ? maybe the xsd schema ?
    Last edited by DevCom; 02-15-2012 at 11:12 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1