小编Edu*_*rez的帖子

XML使用c#从xsd反序列化iso 20022 pain.001.001.03

我想从xml文件中获取一个对象.在我的例子中,我使用iso 2002 pain.001.001.03

ISO 200022 pain.001.001.03

我已经从中下载了架构

pain.001.001.03.xsd

和来自的xml文件

pain.001.001.03.xml

我已使用此工具对xsd验证了我的xml

验证XML

我使用xsd生成了一个类

在此输入图像描述

我正在使用下面的代码来反序列化

   XmlSerializer ser = new XmlSerializer(typeof(CustomerCreditTransferInitiationV03),    new XmlRootAttribute                             
                     { 
                         ElementName = "Document",
                        Namespace = "urn:iso:std:iso:20022:tech:xsd:pain.001.001.03",
                   });


           FileStream myFileStream = new FileStream("C:\\001.001.03\\pain.001.001.03.xml", FileMode.Open);

           CustomerCreditTransferInitiationV03 myObject = (CustomerCreditTransferInitiationV03) ser.Deserialize(myFileStream);
Run Code Online (Sandbox Code Playgroud)

代码返回null值,但我的xml有值

在此输入图像描述

c# xml xsd.exe visual-studio deserialization

4
推荐指数
1
解决办法
2714
查看次数

如何用对角线和对角线文字绘制一个html表格?

我如何使用html5和css3绘制这种表格的任何建议?

例

我试过这个我觉得太复杂了:对角线和对角线文字

我正在使用css3样式和svg html5标签,还有其他方法可以制作这种html表吗?

<div style='width: 300px; height: 100px; display: flex; flex-direction: row-reverse;'>
<div style='width: 100px; height: 100px; border-top: 2px solid rgb(255,0,0); position: relative;'>
<svg style='width: 100%; height: 100%; position: absolute;'>
    <line x1="0" y1="100%" x2="100%" y2="0"
        style="stroke:rgb(255,0,0);stroke-width:2"/>
</svg>
    <div style='margin-left:-40px; margin-top:25px; width: 80px; height: 30px; font-size:19px; background-color: yellow; -ms-transform: rotate(315deg); /* IE 9 */
    -webkit-transform: rotate(315deg); /* Chrome, Safari, Opera */
    transform: rotate(315deg);'>DATO3</div>
</div>
<div style='width: 100px; height: 100px; border-top: 2px solid rgb(255,0,0); position: relative;'>
<svg style='width: 100%; height: …
Run Code Online (Sandbox Code Playgroud)

html css html5 html-table css3

3
推荐指数
1
解决办法
6050
查看次数

如何在vb.net中使用MVC 4中的控制器创建和返回Excel文件?

我在这里使用ExcelLibrary 输入链接描述,因为我不想安装Microsoft Office Excel(microsoft.interop.office.excel)

 Public Function ObtenerExcel() As ActionResult
      Dim workbook As New Workbook()
      Dim worksheet As New Worksheet("Sheet1")
      worksheet.Cells(5, 5) = New Cell(999999)
      worksheet.Cells(10, 10) = New Cell(12354)
      workbook.Worksheets.Add(worksheet)

      Dim stream As New System.IO.MemoryStream
      workbook.SaveToStream(stream)
      stream.Position = 0

      Dim buffer(4096) As Byte
      stream.Read(buffer, 0, buffer.Length)

      Return File(buffer, "application/vnd.ms-excel", "mytestfile.xls")
    End Function
Run Code Online (Sandbox Code Playgroud)

此代码返回一个excel文件,但是当我尝试打开此文件时,它显示一条错误消息(Excel在'text.xls'中找到了不可读的内容.您要恢复此工作簿的内容吗?如果您信任该来源的这个工作簿,单击是.)并没有显示任何内容.

我在Windows 8.1(64位)和Microsoft Office 2013上工作

vb.net excel asp.net-mvc-4 excellibrary

2
推荐指数
1
解决办法
8593
查看次数

如何使用maven和tomcat部署Web应用程序?

我正在尝试部署一个Web应用程序,但它没有用,我正在使用

  • Intellij IDEA 14.1.4
  • OS X YOSEMITE 10.10.4

我有这个配置:

在apache-maven-3.2.5(settings.xml)中

<server>
  <id>TomcatServer</id>
  <username>tomcatg</username>
  <password>sg</password>
</server>
Run Code Online (Sandbox Code Playgroud)

在apache-tomcat-7.0.63(tomcat-users.xml)中

    <tomcat-users>

<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<user username="tomcatg" password="sg" roles="manager-gui"/>
<user username="tomcats" password="ss" roles="manager-script" />
</tomcat-users>
Run Code Online (Sandbox Code Playgroud)

在pom.xml中

<?xml version="1.0" encoding="UTF-8"?>
Run Code Online (Sandbox Code Playgroud)

http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0

<groupId>simple</groupId>
<artifactId>simple</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<dependencies>
    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>javax.servlet-api</artifactId>
        <version>3.1.0</version>
        <scope>provided</scope>
    </dependency>

    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>1.5.6</version>
        <type>jar</type>
    </dependency>

    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-simple</artifactId>
        <version>1.5.6</version>
        <type>jar</type>
    </dependency>


</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.1</version>
            <configuration>
                <source>1.7</source>
                <target>1.7</target>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.tomcat.maven</groupId>
            <artifactId>tomcat7-maven-plugin</artifactId>
            <version>2.2</version>
            <configuration>
                <url>http://127.0.0.1:8080/manager/text/</url>
                <server>TomcatServer</server>
                <username>tomcatg</username> …
Run Code Online (Sandbox Code Playgroud)

java tomcat intellij-idea maven-3 tomcat7

1
推荐指数
1
解决办法
1635
查看次数