您现在的位置: 365建站网 > 365文章 > C#操作XML文档的方法(XmlDocument、XmlNode、XmlAttribute、SelectSingleNode、SelectNodes)

C#操作XML文档的方法(XmlDocument、XmlNode、XmlAttribute、SelectSingleNode、SelectNodes)

文章来源:365jz.com     点击数:1108    更新时间:2018-06-05 09:46   参与评论

C#操作XML文档(XmlDocument、XmlNode、XmlAttribute、SelectSingleNode、SelectNodes、XmlNodeList)


XML文档是一种通用的文档,这种文档既可以用.config作为后缀也可以用.xml作为后缀。XML文档主要由元素节点和节点的属性共同构成的。它有且仅有一个根节点,其他的节点全部都是根节点的子节点或者子子节点;每一个节点有开始就一定会有结束,不可能出现有开始无结束的节点,节点主要有两种类型:有InnerText的<city>……</city>和没有InnerText的<city……/>。在节点中含有属性,一个节点可以含有多个属性,每个属性是由名字和值共同构成的。

在XML文档中,节点、属性都是区分大小写的。对于某个节点的属性,Name是不能重复的,即使在定义属性的时候,定义了两个name完全相同的属性,添加到同一个节点上面,后面的属性会把前面的属性覆盖,不会报语法错误;对于某个节点下面的子节点,则可以添加多个完全相同的子节点。

对XML文档的操作的前提是:XML文档已经存在,并且根节点已经存在。

一、添加节点和属性

1、定义一个XML的操作对象:

XmlDocument doc = new XmlDocument();

2、加载一个XML文件:

doc.Load(@"D:\App.config");

指定的文件一定要存在,否则会报错的。

3、获取根节点:

XmlNode root = doc.DocumentElement;

4、定义一个属性:

XmlAttribute ra = doc.CreateAttribute("Name");

5、给属性的值赋值:

ra.Value = "zwj2";

6、将属性添加到节点上面:

root.Attributes.Append(ra);

7、再定义一个节点为根节点的子节点:

XmlNode root1 = doc.CreateElement("table");

8、给节点赋文本值:

root1.InnerText = "sdf1";

9、给节点定义并添加属性

10、将该节点添加到父节点上去:

root.AppendChild(root1);

11、保存XML文档:

doc.Save(@"D:\App.config");

注意:可以对一个节点添加多个属性,那么各个属性会依次往后排;可以给根节点添加多个子节点,也可以对子节点再添加多个子节点。

二、查询和修改节点和属性

1、元素结点有Name属性,就是<>里面的串,也有InnerText属性(相当于文本结点),就是<></>之间的串:root.Name、root.InnerText。这些属性都是可以读写的。

------------------------------XmlNode

2、属性结点有Name,也有Value:providerName="System.Data.SqlClient",前面为Name,后面为Value这些属性既可读也可写。

------------------------------XmlAttribute

3、每一个结点有子结点的集合,也有属性的集合:root.ChildNodes、root.Attributes;集合都有count属性。

4、集合都满足索引:

对于属性集合,属性的name是不能重复的,所以索引可以是name字符串索引,那么name字符串要存在,否则返回的是一个null属性对象,不会报错;也可以是整数索引,那么此时的整数不能越界,否则是会报错的;:root.Attributes["name"]、root.Attributes[0],返回XmlAttribute。

对于子节点的集合,因为子节点可以完全相同,那么子节点的name肯定也可以相同,所以此时的索引只能是整数的,而不能是子节点name字符串,整数索引也不能越界,否则会报错: root.ChildNodes[10],返回XmlNode。

三、几个重要的函数

1、XmlNode XmlDocument.SelectSingleNode(@"configuration/twoNode/dayStart")

这个函数是用一个声明好的并且已经成功加载了某个配置文件的XmlDocument对象去调用SelectSingleNode函数;该函数的参数是配置文件中的从根节点名字开始一直往下最终到想要的节点的名字,整个名字路径都不能出错,注意是左斜杠;函数的返回值是第一次找到的XmlNode节点的对象,如果找不到就会返回null。

操作如下xml:

<?xmlversion="1.0"?>
<configuration>
  <twoNode>
  </twoNode>
  <twoNode>
    <dayStart>1</dayStart>
    <dayStart>2</dayStart>
    <dayStart>3</dayStart>
  </twoNode> 
</configuration>

如果执行该函数,那么将会找到节点:<dayStart>1</dayStart>

2、XmlNodeList XmlDocument.SelectNodes (@"configuration/twoNode/dayStart")

这个函数是用一个声明好的并且已经成功加载了某个配置文件的XmlDocument对象去调用SelectNodes函数;该函数的参数是配置文件中的从根节点名字开始一直往下最终到想要的节点的名字,整个名字路径都不能出错,注意是左斜杠;因为节点的名字是可能重复的,所以函数的返回值是找到的所有XmlNode节点对象的集合XmlNodeList,如果找不到就会返回null。

XmlNodeList是集合,那么就有count属性,可以直接对这个集合用[int index]来索引具体的对象,也可以用集合的Item(int index)函数来索引具体的对象,但是索引不能越界,否则会出错,返回的是XmlNode。

操作如下xml:

<?xmlversion="1.0"?>
<configuration>
  <twoNode>
    <dayStart>-1</dayStart>
    <dayStart>-2</dayStart>
    <dayStart>-3</dayStart>
  </twoNode>
  <twoNode>
    <dayStart>1</dayStart>
    <dayStart>2</dayStart>
    <dayStart>3</dayStart>
  </twoNode> 
</configuration>

如果执行该函数,那么将会找到节点集合:

    <dayStart>-1</dayStart>

    <dayStart>-2</dayStart>

<dayStart>-3</dayStart>

    <dayStart>1</dayStart>

    <dayStart>2</dayStart>

<dayStart>3</dayStart>

 

操作如下xml:

<?xmlversion="1.0"?>
<configuration>
  <twoNode>
  </twoNode>
  <twoNode>
    <dayStart>1</dayStart>
    <dayStart>2</dayStart>
    <dayStart>3</dayStart>
  </twoNode> 
</configuration>

如果执行该函数,那么将会找到节点集合:

    <dayStart>1</dayStart>

    <dayStart>2</dayStart>

    <dayStart>3</dayStart>

 

下面就开始进行实际操作吧!

一.添加一个xml文件,名为book.xml ,内容如下:


<?xml version="1.0" encoding="utf-8"?><bookstore>
  <book Type="必修课" ISBN="7-111-19149-2">
    <title>数据结构</title>
    <author>严蔚敏</author>
    <price>30.00</price>
  </book>
  <book Type="必修课" ISBN="7-111-19149-3">
    <title>路由型与交换型互联网基础</title>
    <author>程庆梅</author>
    <price>27.00</price>
  </book>
  <book Type="必修课" ISBN="7-111-19149-4">
    <title>计算机硬件技术基础</title>
    <author>李继灿</author>
    <price>25.00</price>
  </book>
  <book Type="必修课" ISBN="7-111-19149-5">
    <title>软件质量保证与管理</title>
    <author>朱少民</author>
    <price>39.00</price>
  </book>
  <book Type="必修课" ISBN="7-111-19149-6">
    <title>算法设计与分析</title>
    <author>王红梅</author>
    <price>23.00</price>
  </book>
  <book Type="选修课" ISBN="7-111-19149-1">
    <title>计算机操作系统</title>
    <author>你猜</author>
    <price>28</price>
  </book></bookstore>


二.添加一个web页面,名为 XML_Operation.aspx,页面内容如下:

一共4个按钮,分别是button1、button2、button3、button4,然后是一个GridView1用来显示数据

 

三.添加一个BookModel.cs类用于读取数据,内容如下:


 public class BookModel
    {        //构造函数
        public BookModel(){}        /// <summary>
        ///  所对应的课程类型        /// </summary>
        public string BookType { get; set; }        /// <summary>
        /// 书所对应的ISBN号        /// </summary>
        public string BookISBN { get; set; }        /// <summary>
        /// 书名        /// </summary>
        public string BookName { get; set; }        /// <summary>
        /// 作者        /// </summary>
        public string BookAuthor { get; set; }        /// <summary>
        /// 价格        /// </summary>
        public string BookPrice { get; set; }
    }


 

四.后台代码如下:

1.添加命名空间 using System.Xml;

2.添加公共方法,用于操作当前XML

/// <summary>
        /// XML操作公共方法
        /// </summary>
        /// <param name="oname">操作类型,create代表创建、delete代表删除、update代表修改、select代表查询</param>
        private void OperationXML(string oname) 
        {
            
            XmlDocument xmldoc = new XmlDocument();//xml操作文档类
            //xmldoc.Load(@"D:\Practice\Test20150703\AboutXML\AboutXML\book.xml");
            XmlReaderSettings set = new XmlReaderSettings();
            set.IgnoreComments = true;//忽略文档注释
            XmlReader reader = XmlReader.Create(@"D:\Practice\Test20150703\AboutXML\AboutXML\book.xml", set);
            xmldoc.Load(reader);
            reader.Close();
            XmlNode node = xmldoc.SelectSingleNode("bookstore");
            XmlNodeList childs = node.ChildNodes;
            switch (oname) 
            {
                case "create"://增加
                    #region
                    XmlElement xmlnew = xmldoc.CreateElement("book");
                    XmlAttribute xmlattri = xmldoc.CreateAttribute("Type");//添加类型
                    xmlattri.Value = "新类型";
                    xmlnew.SetAttributeNode(xmlattri);
                    XmlAttribute isbnatti = xmldoc.CreateAttribute("ISBN");//添加编号
                    xmlnew.SetAttributeNode(isbnatti);
                    isbnatti.Value = DateTime.Now.ToString("yyyymmddHHmmssfff");//注意,最后的f代表毫秒,可以取毫秒的前几位数,比如毫秒123可以用ff取到12
                    node.AppendChild(xmlnew);//将新节点添加到根节点里面
                    XmlElement titlenew = xmldoc.CreateElement("title");
                    titlenew.InnerText = "newtitle";
                    xmlnew.AppendChild(titlenew);//在book字节点下面继续添加子节点
                    XmlElement authornew = xmldoc.CreateElement("author");
                    authornew.InnerText = "newauthor";
                    xmlnew.AppendChild(authornew);//在book字节点下面继续添加子节点
                    XmlElement pricenew = xmldoc.CreateElement("price");
                    pricenew.InnerText = "100k";
                    xmlnew.AppendChild(pricenew);//在book字节点下面继续添加子节点
                    SaveXML(xmldoc,@"D:\Practice\Test20150703\AboutXML\AboutXML\book.xml");//保存并刷新
                    #endregion
                    break;
                case "delete"://删除
                    #region
                    //想要删除某一个结点,直接找到其父结点,然后调用RemoveChild方法即可,现在关键的问题是如何找到这个结点,上面的SelectSingleNode可以传入一个Xpath表,我们通过书的ISBN号来找到这本书所在的结点
                    string xmlPath = string.Format("/bookstore/book[@Type=\"{0}\" and @ISBN=\"{1}\"]", GridView1.Rows[GridView1.Rows.Count - 1].Cells[0].Text, GridView1.Rows[GridView1.Rows.Count - 1].Cells[1].Text);
                    XmlNode xmldelete = xmldoc.DocumentElement.SelectSingleNode(xmlPath);//"/bookstore/book[@ISBN=\"{0}\"]"是一个Xpath表达式,找到类型为所选那一行类型的那本书
                    if (xmldelete != null)
                    {
                        xmldelete.ParentNode.RemoveChild(xmldelete);
                    }
                    SaveXML(xmldoc,@"D:\Practice\Test20150703\AboutXML\AboutXML\book.xml");//保存并刷新
                    #endregion
                    break;
                case "update"://修改
                    #region
                    //修改某条数据的话,首先也是用Xpath表达式找到所需要修改的那一个结点,然后如果是元素的话,就直接对这个元素赋值,如果是属性的话,就用SetAttribute方法设置即可
                    
                    //方法1
                    string xmlpath = string.Format("/bookstore/book[@Type=\"{0}\"]", GridView1.Rows[GridView1.Rows.Count - 1].Cells[0].Text);
                    XmlNode updatenode = xmldoc.DocumentElement.SelectSingleNode(xmlpath);
                    updatenode.Attributes.GetNamedItem("Type").InnerText = "testtype";
                    if (updatenode.ChildNodes != null & updatenode.ChildNodes.Count > 0)
                    {
                        updatenode.ChildNodes.Item(0).InnerText = "testtitle";
                    }
                    //或方法2                   
                    //XmlElement updateattri = (XmlElement)xmldoc.DocumentElement.SelectSingleNode(xmlpath);
                    //updateattri.SetAttribute("Type", "修改类型");
                    //updateattri.GetElementsByTagName("title").Item(0).InnerText = "titleupdate";//注意这里只能用InnerText进行修改而不能用value进行修改
                    //updateattri.GetElementsByTagName("author").Item(0).InnerText = "authorupdate";
                    SaveXML(xmldoc,@"D:\Practice\Test20150703\AboutXML\AboutXML\book.xml");//保存并刷新
                    #endregion
                    break;
                default:      //查询
                    #region
     
                    List<BookModel> booklist = new List<BookModel>();//书本集合
                    foreach (XmlNode child in childs)
                    {
                        BookModel book = new BookModel();
                        XmlElement xe = (XmlElement)child;//将节点转换为元素,便于得到节点的属性值
                        book.BookType = xe.GetAttribute("Type");
                        book.BookISBN = xe.GetAttribute("ISBN");
                        XmlNodeList schild = child.ChildNodes;
                        if (schild != null && schild.Count > 0)
                        {
                            book.BookName = schild.Item(0).InnerText;
                            book.BookAuthor = schild.Item(1).InnerText;
                            book.BookPrice = schild.Item(2).InnerText;
                        }
                        else 
                        {
                            book.BookName = "";
                            book.BookAuthor = "";
                            book.BookPrice = "";
                        }
                        booklist.Add(book);
                    }
                    GridView1.DataSource = booklist;
                    GridView1.DataBind();
                    #endregion
                    break;
            }
        }
        //保存xml
        private void SaveXML(XmlDocument xmldoc, string savePath) 
        {
            xmldoc.Save(savePath);//保存
            OperationXML("select");//刷新
        }

另外,如果想获取XML相对路径,可以这样做,首先引用命名空间using System.IO; 然后直接 stirng xmlPath = Server.MapPath("Gun.xml") 即可。

 

3.各个调用事件如下:


//查询节点
        protected void Button1_Click(object sender, EventArgs e)
        {
            OperationXML("select");
        }        //新增节点
        protected void Button2_Click(object sender, EventArgs e)
        {
            OperationXML("create");
        }        //修改节点
        protected void Button3_Click(object sender, EventArgs e)
        {
            OperationXML("update");
        }        //删除节点
        protected void Button4_Click(object sender, EventArgs e)
        {
            OperationXML("delete");
        }



C#遍历XmlDocument对象所有节点名称、类型、属性(Attribute)

代码

static void Main(string[] args)
        {
            System.Xml.XmlDocument doc = new System.Xml.XmlDocument();
            doc.Load("../../UpdateActivity2.xml");//doc.Load(文件):从文件加载 doc。doc.LoadXml(字符串)从字符串加载
            UpdateActivity2(doc);
        }/// <summary>
        /// 测试方法
        /// </summary>
        /// <param name="doc">XmlDocument对象</param>
        public static void UpdateActivity2(XmlDocument doc)
        {            string xx = doc.InnerXml;            //Activity2
            string activity2ID = "";            string docid = "";            string docTypeid = "";            #region MyRegion
            //获取delete的节点
            //doc.SelectNodes("//Relationships/Item[@action='delete' and @type='Activity2 Deliverable']/related_id[@type='Deliverable']/Item[@type='Document' or @type='CAD']")
            //获取add的节点
            //doc.SelectNodes("//Relationships/Item[@action='add' and @type='Activity2 Deliverable']") 
            #endregion
            XmlNodeList Activity2Nodes = doc.SelectNodes("//Item[@type='Activity2']");            ////遍历Activity2Nodes中的所有节点
            //foreach (XmlNode node in Activity2Nodes)
            //{
            //    Console.WriteLine("=========="+node.Name+"===========");
            //    foreach (XmlAttribute atr in node.Attributes)
            //    {
            //        Console.WriteLine(atr.Name+ "\t:" +atr.Value);
            //    }
            //    XmlNodeList childNodes = doc.ChildNodes;
            //    PrintChildNodes(childNodes);
            //    Console.Read();
            //}
            PrintChildNodes(Activity2Nodes);
            Console.WriteLine("=============================deleteNodes=======================================");            foreach (XmlNode activity2 in Activity2Nodes)
            {
                activity2ID = activity2.Attributes["id"].Value;                //Action = delete
                XmlNodeList deleteNodes = doc.SelectNodes("//Relationships/Item[@action='delete' and @type='Activity2 Deliverable']/related_id[@type='Deliverable']/Item[@type='Document' or @type='CAD']");
                PrintChildNodes(deleteNodes);
            }
        } /// <summary>
        /// 遍历所有节点的type、name、Attributes
        /// </summary>
        /// <param name="childnodelist"></param>
        static void PrintChildNodes(XmlNodeList childnodelist)
        {            try
            {                foreach (XmlNode node in childnodelist)
                {                    //(node.NodeType 是Text时,即是最内层 即innertext值,node.Attributes为null。
                    if (node.NodeType == XmlNodeType.Text)
                    {
                        Console.WriteLine("NodeType:" + node.NodeType + "\t" + node.Name + "\t:" + node.Value);                        continue;
                    }
                    Console.WriteLine("==========node.Name:" + node.Name + "===========");                    foreach (XmlAttribute atr in node.Attributes)
                    {
                        Console.WriteLine("NodeType:"+atr.NodeType+"\t"+ atr.Name + "\t:" + atr.Value);
                    }                    if (node.ChildNodes.Count > 0)
                    {
                        PrintChildNodes(node.ChildNodes);
                    }
                }
            }            catch (Exception ex )
            {
                Console.WriteLine(ex.Message);
            }
        }

       

XML档

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Body>
    <ApplyItem>
      <Item type="Method" action="UpdateActivity2" impersonate="0">
        <Item type="Activity2" typeId="E236DB697E294C46B630C99A0D20C2B1" id="6BDF5F2096F14405BAD77A7182DEF34B" action="UpdateActivity" isDirty="1">
          <config_id keyed_name="治具图" type="Activity2">6BDF5F2096F14405BAD77A7182DEF34B</config_id>
          <created_by_id keyed_name="王旧" type="User">1DCA0BEA51AA46D8982A872C13B0C2C2</created_by_id>
          <created_on>2016-10-14T12:07:17</created_on>
          <current_state keyed_name="Active" type="Life Cycle State" name="Active">348A09DDD3E34CAFA837984AD1426D9C</current_state>
          <date_activated>2017-02-28T19:18:21</date_activated>
          <date_due_sched>2017-04-18T00:00:00</date_due_sched>
          <date_ef>2017-03-03T00:00:00</date_ef>
          <date_es>2017-02-20T00:00:00</date_es>
          <date_lf>2017-09-18T00:00:00</date_lf>
          <date_ls>2017-09-05T00:00:00</date_ls>
          <date_start_sched>2017-04-05T00:00:00</date_start_sched>
          <deliv_required>1</deliv_required>
          <earned_value>0</earned_value>
          <expected_duration>10</expected_duration>
          <generation>1</generation>
          <id keyed_name="治具图" type="Activity2">6BDF5F2096F14405BAD77A7182DEF34B</id>
          <is_critical>0</is_critical>
          <is_current>1</is_current>
          <is_milestone>0</is_milestone>
          <is_released>0</is_released>
          <is_required>1</is_required>
          <keyed_name>治具图</keyed_name>
          <lead_role>Electronics Engineer</lead_role>
          <lx_allreview/>
          <lx_ph>2</lx_ph>
          <lx_requirepart>0</lx_requirepart>
          <lx_review>1</lx_review>
          <lx_review_pers/>
          <major_rev>A</major_rev>
          <managed_by_id keyed_name="王 旧" type="Identity">E96B522DF5DF4E19BF27EF915EE4E6AA</managed_by_id>
          <modified_by_id keyed_name="王 旧" type="User">4C66AA1CBF5145F8B37F37244E84ABFE</modified_by_id>
          <modified_on>2017-09-26T19:42:22</modified_on>
          <new_version>1</new_version>
          <not_lockable>0</not_lockable>
          <owned_by_id keyed_name="梁新" type="Identity">FB0D355A16B04A848417EE270BFE0B02</owned_by_id>
          <percent_compl>0</percent_compl>
          <planned_value>920</planned_value>
          <prev_item>A52478EF81F047D7AFF9BAED2B6CE3F1</prev_item>
          <proj_num>23343</proj_num>
          <signoff_required>0</signoff_required>
          <spi>0.0000</spi>
          <state>Active</state>
          <status>#FF0000</status>
          <team_id keyed_name="5CD06953B4354239AA5E00ADEDE7B078" type="Team">D4ECE5BD68B54D969B87C17C068F3E09</team_id>
          <name>治具图</name>
          <fed_css>
            .percent_compl{background-color:#FFCCCC}
            .date_start_act{background-color:#FFCCCC}          </fed_css>
          <Relationships>
            <Item id="45B304A7BF0F4077B44351E1BD87DCBA" type="Activity2 Deliverable" typeId="0CCA05E05A104F2E88CF123EF4F5171E" action="delete">
              <created_by_id keyed_name="王 旧" type="User">4C66AA1CBF5145F8B37F37244E84ABFE</created_by_id>
              <created_on>2017-09-26T19:38:16</created_on>
              <css is_null="1"/>
              <current_state is_null="1"/>
              <id keyed_name="45B304A7BF0F4077B44351E1BD87DCBA" type="Activity2 Deliverable">45B304A7BF0F4077B44351E1BD87DCBA</id>
              <keyed_name>45B304A7BF0F4077B44351E1BD87DCBA</keyed_name>
              <locked_by_id is_null="1"/>
              <lx_activity2manager keyed_name="王 旧" type="User">4C66AA1CBF5145F8B37F37244E84ABFE</lx_activity2manager>
              <lx_activity2name>治具图</lx_activity2name>
              <lx_classification>品质文件/不良看板</lx_classification>
              <lx_projectnum>23343</lx_projectnum>
              <major_rev>A</major_rev>
              <modified_by_id keyed_name="王 旧" type="User">4C66AA1CBF5145F8B37F37244E84ABFE</modified_by_id>
              <modified_on>2017-09-26T19:38:16</modified_on>
              <related_id keyed_name="DOC16-0000029605" type="Deliverable">
                <Item type="Document" typeId="B88C14B99EF449828C5D926E39EE8B89" id="49A80B2AE016488FB9095B7E6FDA5562">
                  <classification>品质文件/不良看板</classification>
                  <config_id keyed_name="DOC16-0000029605" type="Document">49A80B2AE016488FB9095B7E6FDA5562</config_id>
                  <created_by_id keyed_name="王山" type="User">97CDC886228E4217B70EB32C5E7A051B</created_by_id>
                  <created_on>2016-12-08T14:39:50</created_on>
                  <current_state keyed_name="Released" type="Life Cycle State" name="Released">A089866A0FE34B6799296DE32FD23DB0</current_state>
                  <description>外部线TYPE-C终检不良看板</description>
                  <effective_date>2016-12-09T09:35:04</effective_date>
                  <generation>1</generation>
                  <has_change_pending>0</has_change_pending>
                  <has_files>1</has_files>
                  <id keyed_name="DOC16-0000029605" type="Document">49A80B2AE016488FB9095B7E6FDA5562</id>
                  <is_batchloader>0</is_batchloader>
                  <is_current>1</is_current>
                  <is_released>1</is_released>
                  <is_template>0</is_template>
                  <keyed_name>DOC16-0000029605</keyed_name>
                  <lx_commonarea>外部线</lx_commonarea>
                  <lx_customer/>
                  <lx_doc_cad_partstype>10</lx_doc_cad_partstype>
                  <lx_parts/>
                  <lx_producttype>PTAC_BZLANTO</lx_producttype>
                  <lx_projectname/>
                  <lx_projectnamer>test</lx_projectnamer>
                  <lx_projectnum>23343</lx_projectnum>
                  <lx_ssss>0</lx_ssss>
                  <lx_usefactory>BZLANTO</lx_usefactory>
                  <major_rev>X</major_rev>
                  <modified_by_id keyed_name="Admin" type="User">30B991F927274FA3829655F50C99472E</modified_by_id>
                  <modified_on>2016-12-09T09:35:04</modified_on>
                  <name>外部线TYPE-C终检不良看板</name>
                  <new_version>0</new_version>
                  <not_lockable>1</not_lockable>
                  <owned_by_id keyed_name="品质工程师" type="Identity">7EB1EB96188A438588DDAAD14A2BE716</owned_by_id>
                  <release_date>2016-12-09T09:35:04</release_date>
                  <sop_gen>1</sop_gen>
                  <sop_ver>A</sop_ver>
                  <state>Released</state>
                  <item_number>DOC16-0000029605</item_number>
                  <itemtype>B88C14B99EF449828C5D926E39EE8B89</itemtype>
                </Item>
              </related_id>
              <source_id keyed_name="治具图" type="Activity2">6BDF5F2096F14405BAD77A7182DEF34B</source_id>
            </Item>
            <Item id="7387AC910646405B8CDFA2B8E031B822" type="Activity2 Deliverable" typeId="0CCA05E05A104F2E88CF123EF4F5171E" action="delete">
              <created_by_id keyed_name="王 旧" type="User">4C66AA1CBF5145F8B37F37244E84ABFE</created_by_id>
              <created_on>2017-09-26T19:39:19</created_on>
              <css is_null="1"/>
              <current_state is_null="1"/>
              <id keyed_name="7387AC910646405B8CDFA2B8E031B822" type="Activity2 Deliverable">7387AC910646405B8CDFA2B8E031B822</id>
              <keyed_name>7387AC910646405B8CDFA2B8E031B822</keyed_name>
              <locked_by_id is_null="1"/>
              <lx_activity2manager keyed_name="王 旧" type="User">4C66AA1CBF5145F8B37F37244E84ABFE</lx_activity2manager>
              <lx_activity2name>治具图</lx_activity2name>
              <lx_classification>工程文件/标准排配</lx_classification>
              <lx_projectnum>23343</lx_projectnum>
              <major_rev>A</major_rev>
              <modified_by_id keyed_name="王 旧" type="User">4C66AA1CBF5145F8B37F37244E84ABFE</modified_by_id>
              <modified_on>2017-09-26T19:39:19</modified_on>
              <related_id keyed_name="DOC16-0000029606" type="Deliverable">
                <Item type="Document" typeId="B88C14B99EF449828C5D926E39EE8B89" id="B241B7570448435899F402D48D01599C">
                  <classification>工程文件/标准排配</classification>
                  <config_id keyed_name="DOC16-0000029606" type="Document">B241B7570448435899F402D48D01599C</config_id>
                  <created_by_id keyed_name="黄平" type="User">63E3C06CEC7E429DA6D06ECB87D5B96E</created_by_id>
                  <created_on>2016-12-08T15:08:59</created_on>
                  <current_state keyed_name="Released" type="Life Cycle State" name="Released">7726A5CBBACA4E398FA26DA5682AAB4A</current_state>
                  <effective_date>2016-12-10T13:52:07</effective_date>
                  <generation>1</generation>
                  <has_change_pending>0</has_change_pending>
                  <has_files>1</has_files>
                  <id keyed_name="DOC16-0000029606" type="Document">B241B7570448435899F402D48D01599C</id>
                  <is_batchloader>0</is_batchloader>
                  <is_current>1</is_current>
                  <is_released>1</is_released>
                  <is_template>0</is_template>
                  <keyed_name>DOC16-0000029606</keyed_name>
                  <lx_customer/>
                  <lx_parts>LGJSA002-DT-R</lx_parts>
                  <lx_producttype>PTAA_LX53</lx_producttype>
                  <lx_projectname/>
                  <lx_projectnamer>test</lx_projectnamer>
                  <lx_projectnum>23343</lx_projectnum>
                  <lx_ssss>0</lx_ssss>
                  <lx_usefactory>LX53</lx_usefactory>
                  <major_rev>X</major_rev>
                  <modified_by_id keyed_name="Admin" type="User">30B991F927274FA3829655F50C99472E</modified_by_id>
                  <modified_on>2016-12-10T13:52:07</modified_on>
                  <name>LGJSA002-DT-R排A</name>
                  <new_version>0</new_version>
                  <not_lockable>1</not_lockable>
                  <owned_by_id keyed_name="线装IE工程师" type="Identity">272C18498A9B4902BA7831A8293EEE2D</owned_by_id>
                  <release_date>2016-12-10T13:52:07</release_date>
                  <sop_gen>1</sop_gen>
                  <sop_ver>A</sop_ver>
                  <state>Released</state>
                  <item_number>DOC16-0000029606</item_number>
                  <itemtype>B88C14B99EF449828C5D926E39EE8B89</itemtype>
                </Item>
              </related_id>
              <source_id keyed_name="治具图" type="Activity2">6BDF5F2096F14405BAD77A7182DEF34B</source_id>
            </Item>
            <Item id="4088E5C4E4594477B74D34C2B36D88FB" type="Activity2 Deliverable" typeId="0CCA05E05A104F2E88CF123EF4F5171E">
              <created_by_id keyed_name="王 旧" type="User">4C66AA1CBF5145F8B37F37244E84ABFE</created_by_id>
              <created_on>2017-09-26T19:42:22</created_on>
              <css is_null="1"/>
              <current_state is_null="1"/>
              <id keyed_name="4088E5C4E4594477B74D34C2B36D88FB" type="Activity2 Deliverable">4088E5C4E4594477B74D34C2B36D88FB</id>
              <keyed_name>4088E5C4E4594477B74D34C2B36D88FB</keyed_name>
              <locked_by_id is_null="1"/>
              <lx_activity2manager keyed_name="王 旧" type="User">4C66AA1CBF5145F8B37F37244E84ABFE</lx_activity2manager>
              <lx_activity2name>治具图</lx_activity2name>
              <lx_classification>工程文件/标准排配</lx_classification>
              <lx_projectnum>23343</lx_projectnum>
              <major_rev>A</major_rev>
              <modified_by_id keyed_name="王 旧" type="User">4C66AA1CBF5145F8B37F37244E84ABFE</modified_by_id>
              <modified_on>2017-09-26T19:42:22</modified_on>
              <related_id keyed_name="DOC16-0000029607" type="Deliverable">
                <Item type="Document" typeId="B88C14B99EF449828C5D926E39EE8B89" id="751623C841794ED3AA6E30BA8731EF97">
                  <classification>工程文件/标准排配</classification>
                  <config_id keyed_name="DOC16-0000029607" type="Document">751623C841794ED3AA6E30BA8731EF97</config_id>
                  <created_by_id keyed_name="黄平" type="User">63E3C06CEC7E429DA6D06ECB87D5B96E</created_by_id>
                  <created_on>2016-12-08T15:10:52</created_on>
                  <current_state keyed_name="Released" type="Life Cycle State" name="Released">7726A5CBBACA4E398FA26DA5682AAB4A</current_state>
                  <effective_date>2016-12-10T13:52:07</effective_date>
                  <generation>1</generation>
                  <has_change_pending>0</has_change_pending>
                  <has_files>1</has_files>
                  <id keyed_name="DOC16-0000029607" type="Document">751623C841794ED3AA6E30BA8731EF97</id>
                  <is_batchloader>0</is_batchloader>
                  <is_current>1</is_current>
                  <is_released>1</is_released>
                  <is_template>0</is_template>
                  <keyed_name>DOC16-0000029607</keyed_name>
                  <lx_customer/>
                  <lx_parts>LGJSA001-DT-R</lx_parts>
                  <lx_producttype>PTAA_LX53</lx_producttype>
                  <lx_projectname/>
                  <lx_projectnamer>test,test</lx_projectnamer>
                  <lx_projectnum>26383,23343</lx_projectnum>
                  <lx_ssss>0</lx_ssss>
                  <lx_usearea>A83</lx_usearea>
                  <lx_usefactory>LX53</lx_usefactory>
                  <major_rev>X</major_rev>
                  <modified_by_id keyed_name="Admin" type="User">30B991F927274FA3829655F50C99472E</modified_by_id>
                  <modified_on>2016-12-10T13:52:07</modified_on>
                  <name>LGJSA001-DT-R排A</name>
                  <new_version>0</new_version>
                  <not_lockable>1</not_lockable>
                  <owned_by_id keyed_name="线装IE工程师" type="Identity">272C18498A9B4902BA7831A8293EEE2D</owned_by_id>
                  <release_date>2016-12-10T13:52:07</release_date>
                  <sop_gen>1</sop_gen>
                  <sop_ver>A</sop_ver>
                  <state>Released</state>
                  <item_number>DOC16-0000029607</item_number>
                  <itemtype>B88C14B99EF449828C5D926E39EE8B89</itemtype>
                </Item>
              </related_id>
              <source_id keyed_name="治具图" type="Activity2">6BDF5F2096F14405BAD77A7182DEF34B</source_id>
            </Item>
            <Item type="Activity2 Deliverable" id="34A6671FC78F4C0EBA815F1AD5C4C702" action="add" loaded="1" levels="0" isTemp="1" typeId="0CCA05E05A104F2E88CF123EF4F5171E" LastModifiedOn="1506509992553">
              <related_id>
                <Item type="Deliverable" typeId="86920FEE161244F6B4B507130B18CADE" id="A93C9EE8656C4BDC8F0B22337B07FC1B" levels="0">
                  <classification>客户图</classification>
                  <config_id keyed_name="CAD17-0000011829" type="Deliverable">A93C9EE8656C4BDC8F0B22337B07FC1B</config_id>
                  <created_by_id keyed_name="梁新" type="User">70EC6C95D08F409E9E2378B02115E572</created_by_id>
                  <created_on>2017-03-08T14:07:45</created_on>
                  <current_state keyed_name="In Review" type="Life Cycle State" name="In Review">870C0DCA808F4D0F9718F5F37388235C</current_state>
                  <generation>1</generation>
                  <id keyed_name="CAD17-0000011829" type="Deliverable">A93C9EE8656C4BDC8F0B22337B07FC1B</id>
                  <is_current>1</is_current>
                  <is_released>0</is_released>
                  <itemtype>CCF205347C814DD1AF056875E0A880AC</itemtype>
                  <keyed_name>CAD17-0000011829</keyed_name>
                  <major_rev>X</major_rev>
                  <modified_by_id keyed_name="梁新" type="User">70EC6C95D08F409E9E2378B02115E572</modified_by_id>
                  <modified_on>2017-08-07T10:18:29</modified_on>
                  <new_version>0</new_version>
                  <not_lockable>1</not_lockable>
                  <owned_by_id keyed_name="研发工程师" type="Identity">5BCB3F52640B434EB27747A79D25DB4B</owned_by_id>
                  <state>In Review</state>
                </Item>
              </related_id>
              <source_id keyed_name="治具图">6BDF5F2096F14405BAD77A7182DEF34B</source_id>
            </Item>
            <Item type="Activity2 Deliverable" id="06562E228E0B48E19C5D32CB739517DD" action="add" loaded="1" levels="0" isTemp="1" typeId="0CCA05E05A104F2E88CF123EF4F5171E" LastModifiedOn="1506509992699">
              <related_id>
                <Item type="Deliverable" typeId="86920FEE161244F6B4B507130B18CADE" id="AE6002C6F5F9403F89FD1521E52AE73F" levels="0">
                  <classification>客户图</classification>
                  <config_id keyed_name="CAD17-0000011828" type="Deliverable">BD95AA887A9C4241810FA28875491DCB</config_id>
                  <created_by_id keyed_name="梁新" type="User">70EC6C95D08F409E9E2378B02115E572</created_by_id>
                  <created_on>2017-03-08T14:07:39</created_on>
                  <current_state keyed_name="In Review" type="Life Cycle State" name="In Review">870C0DCA808F4D0F9718F5F37388235C</current_state>
                  <generation>3</generation>
                  <id keyed_name="CAD17-0000011828" type="Deliverable">AE6002C6F5F9403F89FD1521E52AE73F</id>
                  <is_current>1</is_current>
                  <is_released>0</is_released>
                  <itemtype>CCF205347C814DD1AF056875E0A880AC</itemtype>
                  <keyed_name>CAD17-0000011828</keyed_name>
                  <major_rev>X</major_rev>
                  <modified_by_id keyed_name="梁新" type="User">70EC6C95D08F409E9E2378B02115E572</modified_by_id>
                  <modified_on>2017-08-07T10:18:29</modified_on>
                  <new_version>0</new_version>
                  <not_lockable>1</not_lockable>
                  <owned_by_id keyed_name="研发工程师" type="Identity">5BCB3F52640B434EB27747A79D25DB4B</owned_by_id>
                  <state>In Review</state>
                </Item>
              </related_id>
              <source_id keyed_name="治具图">6BDF5F2096F14405BAD77A7182DEF34B</source_id>
            </Item>
          </Relationships>
          <CurrentUserId>4C66AA1CBF5145F8B37F37244E84ABFE</CurrentUserId>
        </Item>
      </Item>
    </ApplyItem>
  </SOAP-ENV:Body></SOAP-ENV:Envelope>

这里写图片描述


如对本文有疑问,请提交到交流论坛,广大热心网友会为你解答!! 点击进入论坛

发表评论 (1108人查看0条评论)
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
昵称:
最新评论
------分隔线----------------------------

快速入口

· 365软件
· 杰创官网
· 建站工具
· 网站大全

其它栏目

· 建站教程
· 365学习

业务咨询

· 技术支持
· 服务时间:9:00-18:00
365建站网二维码

Powered by 365建站网 RSS地图 HTML地图

copyright © 2013-2024 版权所有 鄂ICP备17013400号