internal static ApplicationManifestTaskNodeBase ParseXml(XmlReader reader)
        {
            switch (reader.Name)
            {
                case "DefaultTask":
                    var node = new ApplicationManifestDefaultTaskNode()
                    {
                        Name = reader.GetAttribute("Name"),
                        NavigationPage = reader.GetAttribute("NavigationPage")
                    };

                    reader.Skip();

                    return node;

                case "ExtendedTask":
                    var node2 = new ApplicationManifestExtendedTaskNode
                    {
                        Name = reader.GetAttribute("Name"),
                        BackgroundServiceAgents = reader.ReadElementContentAsArray(ApplicationManifestBackgroundServiceAgentNode.ParseXml)
                    };

                    return node2;

                default:
                    reader.Skip();

                    return null;
            }
        }
        internal static ApplicationManifestAppNode ParseXml(XmlReader reader)
        {
            var node = new ApplicationManifestAppNode()
            {
                Author = reader.GetAttribute("Author"),
                BitsPerPixel = reader.GetAttribute("BitsPerPixel"),
                Description = reader.GetAttribute("Description"),
                Genre = reader.GetAttribute("Genre"),
                HasSettings = reader.GetAttributeAsBool("HasSettings"),
                HubType = reader.GetAttributeAsInt("HubType"),
                IsBeta = reader.GetAttributeAsBool("IsBeta"),
                ProductId = reader.GetAttribute("ProductID"),
                Publisher = reader.GetAttribute("Publisher"),
                PublisherId = reader.GetAttribute("PublisherID"),
                Title = reader.GetAttribute("Title"),
                Version = reader.GetAttribute("Version"),
            };

            reader.ReadStartElement();

            while (reader.NodeType != XmlNodeType.EndElement)
            {
                switch (reader.Name)
                {
                    case "IconPath":
                        node.IconPath = ApplicationManifestIconPathNode.ParseXml(reader);

                        break;

                    case "Capabilities":
                        node.Capabilities = reader.ReadElementContentAsArray(ApplicationManifestNamedNode.ParseXml);

                        break;

                    case "ScreenResolutions":
                        node.ScreenResolutions = reader.ReadElementContentAsArray(ApplicationManifestNamedNode.ParseXml);

                        break;

                    case "Requirements":
                        node.Requirements = reader.ReadElementContentAsArray(ApplicationManifestNamedNode.ParseXml);

                        break;

                    case "Tasks":
                        node.Tasks = reader.ReadElementContentAsArray(ApplicationManifestTaskNodeBase.ParseXml);

                        break;

                    case "Tokens":
                        node.Tokens = reader.ReadElementContentAsArray(ApplicationManifestTokenNode.ParseXml);

                        break;

                    default:
                        reader.Skip();

                        break;
                }
            }

            reader.ReadEndElement();

            return node;
        }
        internal static MarketplaceAppOfferNode ParseXml(XmlReader reader)
        {
            var node = new MarketplaceAppOfferNode();

            reader.ReadStartElement();

            while (reader.NodeType != XmlNodeType.EndElement)
            {
                switch (reader.LocalName)
                {
                    case "offerId":
                        node.OfferId = reader.ReadElementContentAsUrn();
                        break;

                    case "mediaInstanceId":
                        node.MediaInstanceId = reader.ReadElementContentAsUrn();
                        break;

                    case "clientTypes":
                        node.ClientTypes = reader.ReadElementContentAsArray(x => x.ReadElementContentAsString());
                        break;

                    case "paymentTypes":
                        node.PaymentTypes = reader.ReadElementContentAsArray(x => x.ReadElementContentAsString());
                        break;

                    case "store":
                        node.Store = reader.ReadElementContentAsString();
                        break;

                    case "price":
                        node.Price = reader.ReadElementContentAsDouble();
                        break;

                    case "displayPrice":
                        node.DisplayPrice = reader.ReadElementContentAsString();
                        break;

                    case "priceCurrencyCode":
                        node.PriceCurrencyCode = reader.ReadElementContentAsString();
                        break;

                    case "licenseRight":
                        node.LicenseRight = reader.ReadElementContentAsString();
                        break;

                    case "expiration":
                        node.Expiration = reader.ReadElementContentAsDateTime();
                        break;

                    default:
                        reader.Skip();
                        break;
                }
            }

            reader.ReadEndElement();

            return node;
        }
        internal static ApplicationManifest ParseXml(XmlReader reader)
        {
            reader.MoveToContent();

            var node = new ApplicationManifest
            {
                AppPlatformVersion = reader.GetAttribute("AppPlatformVersion")
            };

            reader.ReadStartElement();

            while (reader.NodeType != XmlNodeType.EndElement)
            {
                switch (reader.Name)
                {
                    case "DefaultLanguage":
                        node.DefaultLanguage = ApplicationManifestLanguageNode.ParseXml(reader);

                        break;

                    case "AppExtra":
                        node.AppExtras = reader.ReadElementContentAsArray(ApplicationManifestNamedNode.ParseXml);

                        break;

                    case "Languages":
                        node.Languages = reader.ReadElementContentAsArray(ApplicationManifestLanguageNode.ParseXml);

                        break;

                    case "App":
                        node.App = ApplicationManifestAppNode.ParseXml(reader);

                        break;

                    default:
                        reader.Skip();

                        break;
                }
            }

            reader.ReadEndElement();

            return node;
        }
        internal static WindowsStoreServiceAppNode ParseXml(XmlReader reader)
        {
            var node = new WindowsStoreServiceAppNode();

            reader.ReadStartElement();

            while (reader.NodeType != XmlNodeType.EndElement)
            {
                switch (reader.Name)
                {
                    case "Pt":
                        node.Package = WindowsStoreServiceAppPackageNode.ParseXml(reader);
                        break;

                    case "D":
                        node.Description = reader.ReadElementContentAsString();
                        break;

                    case "Dbps":
                        node.Features = reader.ReadElementContentAsArray(x => x.ReadElementContentAsString());
                        break;

                    case "Ud":
                        node.UpdateDescription = reader.ReadElementContentAsString();
                        break;

                    case "Bsl":
                        node.BaseLanguage = reader.ReadElementContentAsString();
                        break;

                    case "Sls":
                        node.SupportedLanguages = reader.ReadElementContentAsArray(x => x.ReadElementContentAsString());
                        break;

                    case "Dev":
                        node.DeveloperName = reader.ReadElementContentAsString();
                        break;

                    case "DevI":
                        node.DeveloperId = reader.ReadElementContentAsString();
                        break;

                    case "Cr":
                        node.Copyright = reader.ReadElementContentAsString();
                        break;

                    case "Ws":
                        node.Website = reader.ReadElementContentAsString();
                        break;

                    case "Sws":
                        node.SupportWebsite = reader.ReadElementContentAsString();
                        break;

                    case "Pu":
                        node.PrivacyPolicyWebsite = reader.ReadElementContentAsString();
                        break;

                    case "Eula":
                        node.EndUserLicenseAgreement = reader.ReadElementContentAsString();
                        break;

                    case "Sas2":
                        node.SupportedArchitectures = reader.ReadElementContentAsArray(WindowsStoreServiceAppArchitectureNode.ParseXml);
                        break;

                    case "Sss":
                        node.Screenshots = reader.ReadElementContentAsArray(WindowsStoreServiceAppScreenshotNode.ParseXml);
                        break;

                    default:
                        reader.Skip();
                        break;
                }
            }

            reader.ReadEndElement();

            return node;
        }
        internal static MarketplaceAppNode ParseXml(XmlReader reader)
        {
            var node = new MarketplaceAppNode();

            reader.ReadStartElement();

            while (reader.NodeType != XmlNodeType.EndElement)
            {
                switch (reader.Name)
                {
                    case "a:updated":
                        node.Updated = reader.ReadElementContentAsDateTime();
                        break;

                    case "a:title":
                        node.Title = reader.ReadElementContentAsString();
                        break;

                    case "a:id":
                        node.Id = reader.ReadElementContentAsUrn();
                        break;

                    case "a:content":
                        node.Content = MarketplaceAppContentNode.ParseXml(reader);
                        break;

                    case "iapCount":
                        node.IapCount = reader.ReadElementContentAsInt();
                        break;

                    case "sortTitle":
                        node.SortTitle = reader.ReadElementContentAsString();
                        break;

                    case "releaseDate":
                        node.ReleaseDate = reader.ReadElementContentAsDateTime();
                        break;

                    case "visibilityStatus":
                        node.VisibilityStatus = reader.ReadElementContentAsString();
                        break;

                    case "publisher":
                        node.Publisher = reader.ReadElementContentAsString();
                        break;

                    case "averageUserRating":
                        node.AverageUserRating = reader.ReadElementContentAsDouble();
                        break;

                    case "userRatingCount":
                        node.UserRatingCount = reader.ReadElementContentAsInt();
                        break;

                    case "image":
                        node.Image = MarketplaceAppImageNode.ParseXml(reader);
                        break;

                    case "screenshots":
                        node.Screenshots = reader.ReadElementContentAsArray(MarketplaceAppImageNode.ParseXml);
                        break;

                    case "categories":
                        node.Categories = reader.ReadElementContentAsArray(MarketplaceAppCategoryNode.ParseXml);
                        break;

                    case "tags":
                        node.Tags = reader.ReadElementContentAsArray(x => x.ReadElementContentAsString());
                        break;

                    case "taxString":
                        node.TaxString = reader.ReadElementContentAsString();
                        break;

                    case "backgroundImage":
                        node.BackgroundImage = MarketplaceAppImageNode.ParseXml(reader);
                        break;

                    case "offers":
                        node.Offers = reader.ReadElementContentAsArray(MarketplaceAppOfferNode.ParseXml);
                        break;

                    case "publisherId":
                        node.PublisherId = reader.ReadElementContentAsString();
                        break;

                    case "publisherGuid":
                        node.PublisherGuid = reader.ReadElementContentAsUrn();
                        break;

                    case "a:entry":
                        node.Entry = MarketplaceAppEntryNode.ParseXml(reader);
                        break;

                    default:
                        reader.Skip();
                        break;
                }
            }

            reader.ReadEndElement();

            return node;
        }