The answer is ... you don't. If ou look at the documentation http://msdn.microsoft.com/en-us/library/system.windows.hierarchicaldatatemplate(v=vs.110).aspx HierarchicalDataTemplates can only be used with HeaderedItemsControls. The ListView inherits from simple ItemsControl.
You can either use a TreeView or use classic DataTemplates to implement it.