Layer2 Data Provider for XML: Specifications for Business Data List Connector

 

​The Business Data List Connector for SharePoint (BDLC) can be used to connect almost any external data sources to native SharePoint lists, even external XML data, file-based or based on web requests. XPath queries can be used to retrieve the data set required. This FAQ gives the full specifications of the Layer2 Data Provider for XML.

 

 

The Layer2 Data Provider for XML can retrieve data from xml sources on file systems or via http web requests using a connection string and a select statement

 

Connection String:

 

  • Url
    Path to the xml file which can be Url or local file path Aliases are : Url, DataSource, Data source, Web, Host, Server, Address. This field is mandatory.
    Samples are C:\mydir\myfile.xml or http://myserver/myquery.xml
  • UserName / Password
    Optional credentials to connect to the XML data entity using a specific authentication method. Aliases are User, UserId, User Id and Password, pass, pwd.
  • Authentication
    Desired authentication method to connect to the XML data entity. Currently following methods are supported:
     
    Windows
    This authentication method is using a Windows Active Directory account to authenticate against a serverr. If this method is used, it is necessary to define both user and password, whereas the user is specified in the format DOMAIN\username.

    Anonymous
    No authentication is used. The data entity must be configured to allow anonymous access. This is the default authentication method.

 

Select Statement:

 

The data is fetched using a select query statement which actually can contain XPath expressions.

 

The expression which came after the “select” could be ‘*’ or specific field names (actually XPath expressions as well) that tells which fields should appeare in the result set. Using ‘*’ will load all xml content into the DataSet.

 

One disadvantage of this approach is that nodes with attribute(s) are taken into separate table(s) by dataset and a relation is established between main table and this child table. Since first table is returned by the provider as result, child tables are lost.

 

Using field names directly gives more control. The Where clause is also considered to be a XPath expression.

 

A select statement for the Layer2 Data Provider for XML contains the following standard fragments.

 

  • Select
    select title, title/@lang, price from /bookstore/book will give title and price nodes and lang attribute of the title of book node as a datatable
  • From
    A Xpath expression which gets relevant portion of xml.
    Sample: /bookstore/book expression gives all book nodes of the xml file below.

 

Layer2-Data-Provider-XML-SharePoint.png

Fig.: Sample XML data entity and query result for select statement above.

Layer2 Data Provider for XML: Sample Connection Strings

 

  • URL=http://www.w3schools.com/xml/cd_catalog.xml

Layer2 Data Provider for XML: Sample Select Statements

 

 

  • ​Select * from /CATALOG/CD[COUNTRY="USA"]
  • select title, title/@lang, price from /bookstore/book

Layer2 Data Provider for XML: Step-by-Step introduction

 

A step-by-step introduction to sync XML with SharePoint can be found here.

Layer2 Data Provider for XML: Use Cases & Known Issues 

 

  • Almost any LOB application today can export data files formatted as XML or expose XML directly via web requests. The provider can be used to connect to this type of data entity and replicate to native SharePoint lists.
  • Please note that BDLC modifies only changed data in case of modified XML files or requests - not all items in list. Change notifications, alerts and workflows can be used as usual. The content of additional unmapped columns are kept while updating items in SharePoint.
  • While you generally can connect to RSS feeds using this provider, please note that there is a special Layer2 Data Provider for RSS included in BDLC as well. It has some more specific RSS related options.
  • Please note that this provider is read-only (write-back is not supported).

Layer2 Data Provider for XML: Next Steps

 

​Register, download and evaluate the free shareware edition of BDLC today here.

READY TO GO NEXT STEPS?

Layer2 leading solutions product regsitration icon: a grey square with a big orange pen symbol.

Register for free download.

Keep your Sharepoint in sync. Download and try today.

Contact Us Icon for Layer2 leading solutions

Questions? Contact us.

We are here to help. Contact us and our consulting will be happy to answer your questions.