Code Monkey home page Code Monkey logo

labview_parse_xml_data's Introduction

Labview_Parse_XML_Data

Labview 解析XML文件,使用簇结构在内存中处理数据

Labview 测试工程使用Labview2014 版本(可以解析中文,带属性的XML片段)

测试XML文件

<实验0001 xsd版本="V1.0" 版本="0" 设计员="test" 实验编号="111" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:///I:/%e8%88%aa%e7%ba%bf%e5%9f%ba%e7%a1%80%e5%ba%93/RouteXml/RouteXML1.0/RouteDatabaseV1p0.xsd" 空白标签=""> <实验标识码>1</实验标识码> <实验平台>W201706</实验平台> <设备ID 设备序号="1">1</设备ID> <设备ID 设备序号="2">6</设备ID> <设备ID 设备序号="3">11</设备ID> <设备ID 设备序号="4">101</设备ID> <设备ID 设备序号="5">102</设备ID> <设备ID 设备序号="6">103</设备ID> <设备ID 设备序号="7">141</设备ID> <设备ID 设备序号="8">142</设备ID> <设备ID 设备序号="9">143</设备ID> </实验0001>

使用Labview簇结构,自定义数据组织形式,组合(解析xml节点vi),可以实现对不同xml文件的解析, 采用解决思路是(与Labview形式的xml文件类似,但是更通用),加载xml为字符串,使用正则表达式匹配 <></> 解析成功xml文件之后,就可以将xml当做簇处理,修改编辑删除元素等,最后可以反写会字符串,保存到xml文件

labview_parse_xml_data's People

Contributors

qingning3028 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.