@page "/"
<h1>Hello, world!</h1>
Welcome to your new app.
namespace BlazorFiddleProject
{
using Microsoft.AspNetCore.Components.Builder;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Xml.Linq;
using System.Xml.Serialization;
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
}
public void Configure(IComponentsApplicationBuilder app)
{
app.AddComponent<App>("app");
XNamespace SoapNS = "http://schemas.xmlsoap.org/soap/envelope/";
XNamespace TempNS = "http://tempuri.org/";
var ResponseDoc = XDocument.Parse("<?xml version=\"1.0\" encoding=\"utf-8\"?><soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"><soap:Body><GetPDFFormFieldNamesResponse xmlns=\"http://tempuri.org/\"><GetPDFFormFieldNamesResult><string>aa</string><string>bb</string></GetPDFFormFieldNamesResult></GetPDFFormFieldNamesResponse></soap:Body></soap:Envelope>");
var ListRoot = ResponseDoc.Element(SoapNS + "Envelope")
.Element(SoapNS + "Body")
.Element(TempNS + "GetPDFFormFieldNamesResponse")
.Element(TempNS + "GetPDFFormFieldNamesResult");
var Serializer = new XmlSerializer(typeof(List<string>),
new XmlRootAttribute() { ElementName = ListRoot.Name.LocalName, Namespace = ListRoot.Name.NamespaceName });
var List = Serializer.Deserialize(ListRoot.CreateReader()) as List<String>;
Console.WriteLine(List.Count());
}
}
}