<film name="Alien V Predator">
<id>1</id>
<description>feature film with Lance Hendrikson, Sanaa Lathan</description>
<year>2003/2004</year>
<house>20th Century Fox</house>
<director>Paul Anderson</director>
<production>John Davies</production>
<movieclip/>
</film>
It's quite important to import the name which is the attribute of the root node.
Is there any way to do this with CMS Import.
The only I can think of at the moment is to write an XSLT that transforms the source XML to have that attribute as a node. Not exactly sure how to do that but it must be simple I think. The bit that I'm not sure of is how to just bring everything else in unchanged.
Other than that is there an easier way that I am missing?
Xml with attributes is solved in CMSImport 2.0. but in the meanwhile I've written an XmlWithAttributes DataAdapter for you that will help you. Download it here and but the dll in the bin folder of your website.
Then when you start using CMSImport you'll see the Xml with attributes as extra Datasource type. Select this one and continue the process like you normally do.
Then when you are at the mapping screen you will see the attributes prefixed with @ like you see in the following screen.
Import from Attribute
Importing from XML
It's quite important to import the name which is the attribute of the root node.
Is there any way to do this with CMS Import.
The only I can think of at the moment is to write an XSLT that transforms the source XML to have that attribute as a node. Not exactly sure how to do that but it must be simple I think. The bit that I'm not sure of is how to just bring everything else in unchanged.
Other than that is there an easier way that I am missing?
also have to import as media items
so this is a pain
Hi John,
Xml with attributes is solved in CMSImport 2.0. but in the meanwhile I've written an XmlWithAttributes DataAdapter for you that will help you. Download it here and but the dll in the bin folder of your website.
Then when you start using CMSImport you'll see the Xml with attributes as extra Datasource type. Select this one and continue the process like you normally do.
Then when you are at the mapping screen you will see the attributes prefixed with @ like you see in the following screen.
Hope this solves your pain.
Cheers,
Richard
Well that is utterly fantastic. Brilliant I'll try that.
is working on a reply...