XML Data Sources - getting attributes into the import set
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-06-2013 06:23 AM
I'm trying to import a bunch of xml records generated from deployment tool sas part of a cmdb implementation.
No problem with picking the node (module) I want and creating import set columns for each of the children. However, the name of the module is an attribute of the node and I can't get the xpath filter on the data source definition to pick up the children and the attribute. Any ideas?
xml sample attached. xpath /deploy/module gets the children, how do i also include the name attribute?
Cheers
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-06-2013 07:16 AM
You can only get element node values from the XML based imports using data sources. Attributes are ignored.
You may have to parse the XML file using a script first at the source and remove attributes to elements before pulling the file into the data source.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2013 04:50 AM
Suspected as much - problem is these files come from enterprise toolsets so we can't change the output. We'll have to do some pre-processing which is a pain as the xml does meet standards.
Thanks again
Mike