Skip to content
+1-888-319-3663

COMMUNITY FORUM

Using an XML File as a Source

judym@progressive-solutions.com asked 9 years ago
I'm attempting my first map using an xml file as a source.  I was very impressed with the degree of control and detail you get when using an xml file as a destination, but am not finding the same experience when xml is your source. 

I've connected my source file to the map, and was then expecting a way of viewing/confirming/building the xml file schema, but instead there is none and it seems to only pick up the first level of the xml file and none of the child sections.  For example this is generally the xml file structure I am attempting to import into a GP Purchase Order and finding the POItem sections are not available:

<POHeader>
  <PONum>123</PONum>
  ….
  <POItem>
    <ItemNum>1</ItemNum>
    <ItemDescription>Blah</ItemDescription>
    …
  </POItem>
  <POItem>
    <ItemNum>1</ItemNum>
    <ItemDescription>Blah</ItemDescription>
    …
  </POItem>
</POHeader>

Reading through the help and kb and blogs I haven't found any direction that will help in dealing with a multi-level xml file as a source.  Am I missing anything?

Thanks,
Marc
Answers
Best Answer
kevin answered 9 years ago
Marc,

There are two different xml datasources that can be used with SmartConnect. The first is called 'Xml File' and is a legacy data source that can only be used to read data tables that have been written to xml format. The second is called 'Xml Query' and can be used to read files of the type you have described. Simply point the datasource at your file and it will read your structure correctly.

Note: the Xml Query data source may also be used within the Folder Data Source. So xml files placed in a specified directory can be opened and read as per other folder data source options.

regards
Kevin
judym@progressive-solutions.com replied 9 years ago

Of course you thought of that.  I knew I was just missing something.  Thanks a lot Kevin.

RobertF replied 6 years ago

Kevin,
I am trying to use an XML query as a datasource but it doesn’t read the entire file. Its reads the top 2 levels but not the 3rd. Any ideas? When I see the xml query it shows the entire file but when I preview it it drops the 3rd level instead of creating more columns.


If you would like to submit an answer or comment, please sign in to the eOne portal.