Was this article helpful?

XML File

MR900432536.JPG Connecting to XML Data source Tutorial Video. This video will walk you through how to connect to an XML file as a data source.

 

XmlDataSource.png

Use this datasource to connect to any XML file.

You do not need to install any connector to access XML files, this code is all included in AutoTag.

File / URL: Enter the file (including directory) or url to retreive the XML file.

Protocol: You can set this to one of three protocols used to read the XML file in.

  • Standard - Will use the common method to retreive the file. If you are not sure which protocol to use, this is it.

  • REST - This will pass credentials using the BASIC credentials on the first request and set the ContentType to XML. Many REST sources will work with Standard but some require this special setting. (This is needed when a REST source returns HTML instead of an error for missing credentials and returns HTML instead of XML if the ContentType is not set.)

  • SharePoint - This is needed for FBA (Forms Based Authentication) access to a SharePoint site. You do not need this protocol for a SharePoint site that uses other methods of authentication.

Schema: A schema provides the structure of your XML file. This provides significant additional information of use to AutoTag: All possible nodes (the XML file just gives us the nodes used), the data type of each node, and a description for each node (which we then display as a tooltip in the datasource schema tree). You can set this to:

  • No schema - You have no schema file.

  • Use xsi:schemaLocation - The XML file lists the schema using an xsi node. Sometimes (not always) the schema file is on the web at that location. With this setting it will read the file from that location. Again, many times there is no file at the specified location and the url is just a name.

  • File / URL - Provide a local copy of the schema file.

Credentials: This is used for files (to access the server\share), http, & ftp if needed. Set to Use Windows Identity if no credentials are needed or your Windows login user has access to the file.

Root Directory:  This is used to specify a base directory that is used for imported files that have a relative path.  This must be set in AutoTag and also in the code when creating the datasource provider before applying it in the engine.

Retrieving XML From Jars

The Java engine has always supported retrieval of XML files from a Jar, in DOCX, PPTX, and XLSX using
' RunReport from_file.docx report.xml -xml "jar:file:c:/test/from_file.docx!/data/order.xml" '.
The .NET engine and AutoTag now also support this.

Retrieving XML From An AutoTag Template

Along with the "jar:file: ..." URL, AutoTag (but not the engines) can use "self:/data/order.xml" to pull the data from the file it is editing (DOCX, PPTX, and XLSX only).

Important Note on Windward Videos

Can't view the video? See Broken Images and Videos in the Windward wiki and Broken Videos: Vimeo and Firefox for help.

Was this article helpful?
Pages that link here
Page statistics
1551 view(s), 9 edit(s) and 5692 character(s)

Tags

This page has no custom tags set.

Comments

You must to post a comment.

Attach file

Attachments

FileVersionSizeModifiedOptions