diff --git a/xmlsitemap.generate.inc b/xmlsitemap.generate.inc
index 747347a..1d054b2 100644
--- a/xmlsitemap.generate.inc
+++ b/xmlsitemap.generate.inc
@@ -150,7 +150,17 @@ function xmlsitemap_generate_chunk(stdClass $sitemap, XMLSitemapWriter $writer,
   $link_count = 0;
 
   $query = db_select('xmlsitemap', 'x');
-  $query->fields('x', array('loc', 'lastmod', 'changefreq', 'changecount', 'priority', 'language', 'access', 'status'));
+  /*
+   * Hack starts here
+   * Get extra fields. We need will this extra information to do lookups on nodes for example.
+   * Commented line $query->fields('x', array('loc', 'lastmod', 'changefreq', 'changecount', 'priority', 'language', 'access', 'status'));and added below instead.
+  */
+  //$query->fields('x', array('loc', 'lastmod', 'changefreq', 'changecount', 'priority', 'language', 'access', 'status'));
+  $query->fields('x', array('loc', 'lastmod', 'changefreq', 'changecount', 'priority', 'language', 'access', 'status', 'type', 'subtype', 'id'));
+  /*
+   * Hack ends here
+  */
+
   $query->condition('x.access', 1);
   $query->condition('x.status', 1);
   $query->orderBy('x.language', 'DESC');
@@ -207,7 +217,21 @@ function xmlsitemap_generate_chunk(stdClass $sitemap, XMLSitemapWriter $writer,
       // sitemaps.org specification.
       $element['priority'] = number_format($link['priority'], 1);
     }
+
+    /*
+     * Hack starts here
+     * Adding a hook to alter the element.
+     * We need to alter the xml entry before it is output to add in extended infomation e.g. video information
+     * Passing in the link, to give some lookup information
+    */
+    $element_invoked = module_invoke_all('xmlsitemap_item_extend',  $element, $link);
+    if(count($element_invoked)) {
+      $element = $element_invoked;
+    }
     $writer->writeSitemapElement('url', $element);
+    /*
+     * Hack Ends here
+    */
   }
 
   return $link_count;
diff --git a/xmlsitemap.module b/xmlsitemap.module
index 93e935f..3cc8af9 100644
--- a/xmlsitemap.module
+++ b/xmlsitemap.module
@@ -55,6 +55,11 @@ define('XMLSITEMAP_PRIORITY_DEFAULT', 0.5);
  * Implements hook_hook_info().
  */
 function xmlsitemap_hook_info() {
+  /*
+   *Hacked Info:
+   *added "xmlsitemap_item_extend" in $hooks array as mentioend in issue queue https://www.drupal.org/node/1370474
+   *hook_xmlsitemap_item_extend to alter generated link elements
+  */
   $hooks = array(
     'xmlsitemap_link_info',
     'xmlsitemap_link_info_alter',
@@ -72,6 +77,7 @@ function xmlsitemap_hook_info() {
     'query_xmlsitemap_generate_alter',
     'query_xmlsitemap_link_bundle_access_alter',
     'form_xmlsitemap_sitemap_edit_form_alter',
+    'xmlsitemap_item_extend',
   );
 
   $hooks = array_combine($hooks, $hooks);
diff --git a/xmlsitemap.xmlsitemap.inc b/xmlsitemap.xmlsitemap.inc
index 9ce895d..8ba91b6 100644
--- a/xmlsitemap.xmlsitemap.inc
+++ b/xmlsitemap.xmlsitemap.inc
@@ -66,6 +66,14 @@ class XMLSitemapWriter extends XMLWriter {
    */
   public function getRootAttributes() {
     $attributes['xmlns'] = 'http://www.sitemaps.org/schemas/sitemap/0.9';
+    /*
+     * Hack Starts here
+     * TODO - Add attribute based on conditions. Need to extend settings form as required.
+    */
+    $attributes['xmlns:video'] = 'http://www.google.com/schemas/sitemap-video/1.1';
+    /*
+     * Hack ends here
+    */
     if (variable_get('xmlsitemap_developer_mode', 0)) {
       $attributes['xmlns:xsi'] = 'http://www.w3.org/2001/XMLSchema-instance';
       $attributes['xsi:schemaLocation'] = 'http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd';
@@ -175,6 +183,14 @@ class XMLSitemapIndexWriter extends XMLSitemapWriter {
 
   public function getRootAttributes() {
     $attributes['xmlns'] = 'http://www.sitemaps.org/schemas/sitemap/0.9';
+    /*
+     * Hack Starts here
+     * TODO - Add attribute based on conditions. Need to extend settings form as required.
+    */
+    $attributes['xmlns:video'] = 'http://www.google.com/schemas/sitemap-video/1.1';
+    /*
+     * Hack ends here
+    */
     if (variable_get('xmlsitemap_developer_mode', 0)) {
       $attributes['xmlns:xsi'] = 'http://www.w3.org/2001/XMLSchema-instance';
       $attributes['xsi:schemaLocation'] = 'http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd';
