如何将示例问题文本拆分为xml标记 [英] How to split the sample question paper into an xml tag

查看:82
本文介绍了如何将示例问题文本拆分为xml标记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Simple	
1.		The Partial differential equation formed by the elimination  of a and b from z= (x+1)(y+b) is
(a) z= p+q (b) p-1  (c) z=xypq  (d) z=pq	[       ]
2.		The partial differential equation formed by eliminating the arbitrary contants a and b from z= (x2+a)(y2+b) is 
(a) xyz=pq   (b) xyz = p   (c) 4xyz = pq   (d) xyz = q	[       ]
3.		The partial differential equation formed by eliminating the arbitrary constants a and b from z= ax+by+ab is 
(a) z= p+q+pq  (b) z= px+qy+pq  (c) z= py+qx  (d) py+qx+pq	[       ]
4.		The partial differential equation by the elimination of a and b from z= ax+a2y2+b is
(a) q=2yp2  (b) q2=2yp (c) p2=2yq2   (d) p=2yq2	[       ]
5.		The partial differential equation by the elimination of a and b from az+b = a2x+y is
(a) p+q=1  (b) pq=1  (c) xp+yq=1  (d) xp-yq = 1	[       ]





我有一个问题文件的格式。我必须分开这个问题的论文和th转换成xml标签。



条件是

1)将问题分成一个标签然后将答案分成四个单独的子标签标签。



请帮我拆分这种格式以及如何转换成XML格式。





我不知道如何使用常用符号分割主标签问题和子标签答案。请告诉我用于分隔问题和答案的符号



I have a question paper in the word format..I have to split this question paper and then convert into xml tag.

The conditions are
1)split the question into one tag and then split the answer into four separate sub tags.

Pls help me to split this format and how to convert into XML.


I dont know how to split using common symbol for main tag question and sub tags answers..please tell me the symbol used to separate questions and answers

推荐答案





为了分割你的文件,请看看这个...



< a href =http://www.dotnetperls.com/split> http://www.dotnetperls.com/split [ ^ ]



Hi,

For splitting your document, plz look into this...

http://www.dotnetperls.com/split[^]

int i = 0;
    foreach (string line in File.ReadAllLines("TextFile1.txt"))
    {

        //string[] parts = line.Split(','); 
//Use any one here to split,after splitting you can save into the xml file 
        //string[] lines = Regex.Split(value, "\r\n");
        foreach (string part in parts)
        {
        Console.WriteLine("{0}:{1}",
            i,
            part);
        }
        i++; // For demonstration.
    }







//将字符串转换为XML ..




// For converting string to XML..

using System;
using System.Xml;

namespace StringToXml
{
 class Program
 {
  static void Main(string[] args)
  {
   string s = "hello";
   XmlDocument xm = new XmlDocument();
   xm.LoadXml(string.Format("<root>{0}</root>", s));

   Console.WriteLine(xm.InnerXml);
   Console.ReadKey();
  }
 }
}


这篇关于如何将示例问题文本拆分为xml标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆