-2

我见过一种仅使用 C# 类名读取和写入 XML 到磁盘的技术,而Attributes[].

这叫什么,以及如何将其应用于如下所示的数据集:

<?xml version="1.0"?>   
<feedback>  
  <report_metadata> 
    <org_name>Yahoo! Inc.</org_name>    
    <email>postmaster@dmarc.yahoo.com</email>   
    <report_id>1340012067.929728</report_id>    
    <date_range>    
      <begin>1339891200</begin> 
      <end>1339977599 </end>    
    </date_range>   
  </report_metadata>    
  <policy_published>    
    <domain>company.com</domain>    
    <adkim>r</adkim>    
    <aspf>r</aspf>  
    <p>none</p> 
    <pct>100</pct>  
  </policy_published>   
  <record>  
    <row>   
      <source_ip>123.18.181.64</source_ip>  
      <count>1</count>  
      <policy_evaluated>    
        <disposition>none</disposition> 
        <dkim>fail</dkim>   
        <spf>fail</spf> 
      </policy_evaluated>   
    </row>  
    <identifiers>   
      <header_from>company.com</header_from>    
    </identifiers>  
    <auth_results>  
      <dkim>    
        <domain>company.com</domain>    
        <result>neutral</result>    
      </dkim>   
      <spf> 
        <domain>company.com</domain>    
        <result>softfail</result>   
      </spf>    
    </auth_results> 
  </record> 
</feedback> 

更新

我能够将该 XML 转换为类型安全的 C#:

我运行了这个命令来获取架构

C:\Temp>xsd test.xml  /c /language:cs /out:c:\temp
Microsoft (R) Xml Schemas/DataTypes support utility
[Microsoft (R) .NET Framework, Version 4.0.30319.1]
Copyright (C) Microsoft Corporation. All rights reserved.
Writing file 'c:\temp\test.xsd'.

然后运行此命令以获取 CS 文件

C:\Temp>xsd test.xsd /c /language:cs
Microsoft (R) Xml Schemas/DataTypes support utility
[Microsoft (R) .NET Framework, Version 4.0.30319.1]
Copyright (C) Microsoft Corporation. All rights reserved.
Writing file 'C:\Temp\test.cs'.

//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.544
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

using System.Xml.Serialization;

// 
// This source code was auto-generated by xsd, Version=4.0.30319.1.
// 


/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
[System.Xml.Serialization.XmlRootAttribute(Namespace = "", IsNullable = false)]
public partial class feedback
{

    private object[] itemsField;

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute("policy_published", typeof(feedbackPolicy_published), Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    [System.Xml.Serialization.XmlElementAttribute("record", typeof(feedbackRecord), Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    [System.Xml.Serialization.XmlElementAttribute("report_metadata", typeof(feedbackReport_metadata), Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public object[] Items
    {
        get
        {
            return this.itemsField;
        }
        set
        {
            this.itemsField = value;
        }
    }
}

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
public partial class feedbackPolicy_published
{

    private string domainField;

    private string adkimField;

    private string aspfField;

    private string pField;

    private string pctField;

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string domain
    {
        get
        {
            return this.domainField;
        }
        set
        {
            this.domainField = value;
        }
    }

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string adkim
    {
        get
        {
            return this.adkimField;
        }
        set
        {
            this.adkimField = value;
        }
    }

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string aspf
    {
        get
        {
            return this.aspfField;
        }
        set
        {
            this.aspfField = value;
        }
    }

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string p
    {
        get
        {
            return this.pField;
        }
        set
        {
            this.pField = value;
        }
    }

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string pct
    {
        get
        {
            return this.pctField;
        }
        set
        {
            this.pctField = value;
        }
    }
}

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
public partial class feedbackRecord
{

    private feedbackRecordRow[] rowField;

    private feedbackRecordIdentifiers[] identifiersField;

    private feedbackRecordAuth_results[] auth_resultsField;

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute("row", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public feedbackRecordRow[] row
    {
        get
        {
            return this.rowField;
        }
        set
        {
            this.rowField = value;
        }
    }

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute("identifiers", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public feedbackRecordIdentifiers[] identifiers
    {
        get
        {
            return this.identifiersField;
        }
        set
        {
            this.identifiersField = value;
        }
    }

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute("auth_results", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public feedbackRecordAuth_results[] auth_results
    {
        get
        {
            return this.auth_resultsField;
        }
        set
        {
            this.auth_resultsField = value;
        }
    }
}

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
public partial class feedbackRecordRow
{

    private string source_ipField;

    private string countField;

    private feedbackRecordRowPolicy_evaluated[] policy_evaluatedField;

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string source_ip
    {
        get
        {
            return this.source_ipField;
        }
        set
        {
            this.source_ipField = value;
        }
    }

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string count
    {
        get
        {
            return this.countField;
        }
        set
        {
            this.countField = value;
        }
    }

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute("policy_evaluated", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public feedbackRecordRowPolicy_evaluated[] policy_evaluated
    {
        get
        {
            return this.policy_evaluatedField;
        }
        set
        {
            this.policy_evaluatedField = value;
        }
    }
}

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
public partial class feedbackRecordRowPolicy_evaluated
{

    private string dispositionField;

    private string dkimField;

    private string spfField;

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string disposition
    {
        get
        {
            return this.dispositionField;
        }
        set
        {
            this.dispositionField = value;
        }
    }

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string dkim
    {
        get
        {
            return this.dkimField;
        }
        set
        {
            this.dkimField = value;
        }
    }

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string spf
    {
        get
        {
            return this.spfField;
        }
        set
        {
            this.spfField = value;
        }
    }
}

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
public partial class feedbackRecordIdentifiers
{

    private string header_fromField;

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string header_from
    {
        get
        {
            return this.header_fromField;
        }
        set
        {
            this.header_fromField = value;
        }
    }
}

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
public partial class feedbackRecordAuth_results
{

    private feedbackRecordAuth_resultsDkim[] dkimField;

    private feedbackRecordAuth_resultsSpf[] spfField;

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute("dkim", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public feedbackRecordAuth_resultsDkim[] dkim
    {
        get
        {
            return this.dkimField;
        }
        set
        {
            this.dkimField = value;
        }
    }

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute("spf", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public feedbackRecordAuth_resultsSpf[] spf
    {
        get
        {
            return this.spfField;
        }
        set
        {
            this.spfField = value;
        }
    }
}

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
public partial class feedbackRecordAuth_resultsDkim
{

    private string domainField;

    private string resultField;

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string domain
    {
        get
        {
            return this.domainField;
        }
        set
        {
            this.domainField = value;
        }
    }

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string result
    {
        get
        {
            return this.resultField;
        }
        set
        {
            this.resultField = value;
        }
    }
}

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
public partial class feedbackRecordAuth_resultsSpf
{

    private string domainField;

    private string resultField;

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string domain
    {
        get
        {
            return this.domainField;
        }
        set
        {
            this.domainField = value;
        }
    }

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string result
    {
        get
        {
            return this.resultField;
        }
        set
        {
            this.resultField = value;
        }
    }
}

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
public partial class feedbackReport_metadata
{

    private string org_nameField;

    private string emailField;

    private string report_idField;

    private feedbackReport_metadataDate_range[] date_rangeField;

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string org_name
    {
        get
        {
            return this.org_nameField;
        }
        set
        {
            this.org_nameField = value;
        }
    }

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string email
    {
        get
        {
            return this.emailField;
        }
        set
        {
            this.emailField = value;
        }
    }

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string report_id
    {
        get
        {
            return this.report_idField;
        }
        set
        {
            this.report_idField = value;
        }
    }

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute("date_range", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public feedbackReport_metadataDate_range[] date_range
    {
        get
        {
            return this.date_rangeField;
        }
        set
        {
            this.date_rangeField = value;
        }
    }
}

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
public partial class feedbackReport_metadataDate_range
{

    private string beginField;

    private string endField;

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string begin
    {
        get
        {
            return this.beginField;
        }
        set
        {
            this.beginField = value;
        }
    }

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string end
    {
        get
        {
            return this.endField;
        }
        set
        {
            this.endField = value;
        }
    }
}
4

5 回答 5

2

您可以使用 XMLSerializer 类来做到这一点。

看看这里:XMLSerializer 上的 MSDN

这里是关于做什么的描述:How to read and write XML in C#

但是,如果您在 C# 中编写一些表示 XML 的类并编写 ReadXML 和 WriteXML 方法……或者首先使用属性,则要舒服得多。

在这里你有一篇小文章它是如何工作的: CodeProject:如何使用 XMLSerializer

于 2012-06-18T18:25:07.700 回答
2

This Article of Code Project will help you ..

http://www.codeproject.com/Articles/24376/LINQ-to-XML

and this also

http://www.hookedonlinq.com/LINQtoXML5MinuteOverview.ashx

于 2012-06-18T18:27:30.743 回答
2

在这里你不写你的要求。你可以试试using System.Xml

这是执行读取 XML 文件的小代码

  XmlDocument doc = new XmlDocument();
  doc.Load("Test.xml");
  XmlElement root = doc.DocumentElement;
//Preform your read and write operation here
 doc.Save("Test.xml");
于 2012-06-18T18:28:03.720 回答
1

使用 C# 读取 XML 的常用方法是LINQ to XMLXmlDocumentXmlReader.

本文详细介绍了每种方式的性能。简而言之,XmlReader具有更好的全面性能。但是,LINQ to XML对于非常小的 XML 文档(只有一个子节点)具有更好的性能。

于 2012-06-18T18:25:33.257 回答
1

这是XML

我运行了这个命令来获取架构

C:\Temp>xsd test.xml  /c /language:cs /out:c:\temp
Microsoft (R) Xml Schemas/DataTypes support utility
[Microsoft (R) .NET Framework, Version 4.0.30319.1]
Copyright (C) Microsoft Corporation. All rights reserved.
Writing file 'c:\temp\test.xsd'.

然后运行此命令以获取 CS 文件

C:\Temp>xsd test.xsd /c /language:cs
Microsoft (R) Xml Schemas/DataTypes support utility
[Microsoft (R) .NET Framework, Version 4.0.30319.1]
Copyright (C) Microsoft Corporation. All rights reserved.
Writing file 'C:\Temp\test.cs'.

//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.544
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

using System.Xml.Serialization;

// 
// This source code was auto-generated by xsd, Version=4.0.30319.1.
// 


/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
[System.Xml.Serialization.XmlRootAttribute(Namespace = "", IsNullable = false)]
public partial class feedback
{

    private object[] itemsField;

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute("policy_published", typeof(feedbackPolicy_published), Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    [System.Xml.Serialization.XmlElementAttribute("record", typeof(feedbackRecord), Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    [System.Xml.Serialization.XmlElementAttribute("report_metadata", typeof(feedbackReport_metadata), Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public object[] Items
    {
        get
        {
            return this.itemsField;
        }
        set
        {
            this.itemsField = value;
        }
    }
}

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
public partial class feedbackPolicy_published
{

    private string domainField;

    private string adkimField;

    private string aspfField;

    private string pField;

    private string pctField;

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string domain
    {
        get
        {
            return this.domainField;
        }
        set
        {
            this.domainField = value;
        }
    }

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string adkim
    {
        get
        {
            return this.adkimField;
        }
        set
        {
            this.adkimField = value;
        }
    }

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string aspf
    {
        get
        {
            return this.aspfField;
        }
        set
        {
            this.aspfField = value;
        }
    }

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string p
    {
        get
        {
            return this.pField;
        }
        set
        {
            this.pField = value;
        }
    }

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string pct
    {
        get
        {
            return this.pctField;
        }
        set
        {
            this.pctField = value;
        }
    }
}

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
public partial class feedbackRecord
{

    private feedbackRecordRow[] rowField;

    private feedbackRecordIdentifiers[] identifiersField;

    private feedbackRecordAuth_results[] auth_resultsField;

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute("row", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public feedbackRecordRow[] row
    {
        get
        {
            return this.rowField;
        }
        set
        {
            this.rowField = value;
        }
    }

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute("identifiers", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public feedbackRecordIdentifiers[] identifiers
    {
        get
        {
            return this.identifiersField;
        }
        set
        {
            this.identifiersField = value;
        }
    }

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute("auth_results", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public feedbackRecordAuth_results[] auth_results
    {
        get
        {
            return this.auth_resultsField;
        }
        set
        {
            this.auth_resultsField = value;
        }
    }
}

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
public partial class feedbackRecordRow
{

    private string source_ipField;

    private string countField;

    private feedbackRecordRowPolicy_evaluated[] policy_evaluatedField;

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string source_ip
    {
        get
        {
            return this.source_ipField;
        }
        set
        {
            this.source_ipField = value;
        }
    }

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string count
    {
        get
        {
            return this.countField;
        }
        set
        {
            this.countField = value;
        }
    }

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute("policy_evaluated", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public feedbackRecordRowPolicy_evaluated[] policy_evaluated
    {
        get
        {
            return this.policy_evaluatedField;
        }
        set
        {
            this.policy_evaluatedField = value;
        }
    }
}

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
public partial class feedbackRecordRowPolicy_evaluated
{

    private string dispositionField;

    private string dkimField;

    private string spfField;

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string disposition
    {
        get
        {
            return this.dispositionField;
        }
        set
        {
            this.dispositionField = value;
        }
    }

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string dkim
    {
        get
        {
            return this.dkimField;
        }
        set
        {
            this.dkimField = value;
        }
    }

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string spf
    {
        get
        {
            return this.spfField;
        }
        set
        {
            this.spfField = value;
        }
    }
}

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
public partial class feedbackRecordIdentifiers
{

    private string header_fromField;

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string header_from
    {
        get
        {
            return this.header_fromField;
        }
        set
        {
            this.header_fromField = value;
        }
    }
}

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
public partial class feedbackRecordAuth_results
{

    private feedbackRecordAuth_resultsDkim[] dkimField;

    private feedbackRecordAuth_resultsSpf[] spfField;

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute("dkim", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public feedbackRecordAuth_resultsDkim[] dkim
    {
        get
        {
            return this.dkimField;
        }
        set
        {
            this.dkimField = value;
        }
    }

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute("spf", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public feedbackRecordAuth_resultsSpf[] spf
    {
        get
        {
            return this.spfField;
        }
        set
        {
            this.spfField = value;
        }
    }
}

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
public partial class feedbackRecordAuth_resultsDkim
{

    private string domainField;

    private string resultField;

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string domain
    {
        get
        {
            return this.domainField;
        }
        set
        {
            this.domainField = value;
        }
    }

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string result
    {
        get
        {
            return this.resultField;
        }
        set
        {
            this.resultField = value;
        }
    }
}

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
public partial class feedbackRecordAuth_resultsSpf
{

    private string domainField;

    private string resultField;

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string domain
    {
        get
        {
            return this.domainField;
        }
        set
        {
            this.domainField = value;
        }
    }

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string result
    {
        get
        {
            return this.resultField;
        }
        set
        {
            this.resultField = value;
        }
    }
}

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
public partial class feedbackReport_metadata
{

    private string org_nameField;

    private string emailField;

    private string report_idField;

    private feedbackReport_metadataDate_range[] date_rangeField;

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string org_name
    {
        get
        {
            return this.org_nameField;
        }
        set
        {
            this.org_nameField = value;
        }
    }

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string email
    {
        get
        {
            return this.emailField;
        }
        set
        {
            this.emailField = value;
        }
    }

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string report_id
    {
        get
        {
            return this.report_idField;
        }
        set
        {
            this.report_idField = value;
        }
    }

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute("date_range", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public feedbackReport_metadataDate_range[] date_range
    {
        get
        {
            return this.date_rangeField;
        }
        set
        {
            this.date_rangeField = value;
        }
    }
}

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
public partial class feedbackReport_metadataDate_range
{

    private string beginField;

    private string endField;

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string begin
    {
        get
        {
            return this.beginField;
        }
        set
        {
            this.beginField = value;
        }
    }

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string end
    {
        get
        {
            return this.endField;
        }
        set
        {
            this.endField = value;
        }
    }
}
于 2012-06-18T18:30:25.100 回答