XML模式文件

时间:2017-02-06 20:17:08

标签: xml schema

我想为下面显示的xml文件生成一个模式文件。基本上我想把它变成一个图表,标题在列中运行(项目编号,零件编号等),然后行将是来自下部的bomcell col_no。尝试使用一些模式工具将其导入Excel无济于事。如果有人能指出我正确的方向,我可能会定义方案。

module.exports = {
  entry: {
    'main': [
      'bootstrap-sass!./src/theme/bootstrap.config.js',
      './src/client.js',
      './src/someCSSFILE.js'
    ]
  },
  output: {
    path: assetsPath,
    filename: 'bundle.js',
    publicPath: 'http://' + host + ':' + port + '/dist/',
  },
  module: {
    loaders: [
      { test: /\.jsx?$/, exclude: /node_modules/, loaders: ['babel?' + JSON.stringify(babelLoaderQuery), 'eslint-loader']},
      { test: /\.json$/, loader: 'json-loader' },
      { test: /\.less$/, loader: 'style!css?modules&importLoaders=2&sourceMap&localIdentName=[local]___[hash:base64:5]!autoprefixer?browsers=last 2 version!less?outputStyle=expanded&sourceMap' },
      { test: /\.scss$/, loader: 'style!css?modules&importLoaders=2&sourceMap&localIdentName=[local]___[hash:base64:5]!autoprefixer?browsers=last 2 version!sass?outputStyle=expanded&sourceMap' },
      { test: /\.woff(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&mimetype=application/font-woff" }
 ]

}

真的很喜欢这种类型的输出:

<?xml version="1.0" encoding="UTF-8"?>
<xml>
    <transactions>
        <transaction date="1485976336" type="export_bom_spreadsheet" vaultname="PDM_Pro">
            <bom document_id="2113" document_path="\EPDM Demo Files\9011-01765.SLDDRW" id="2133"
                name="9011-01765.SLDDRW: Bill of Materials1" path="\EPDM Demo Files\" type="3">
                <bomheader>
                    <bomcol alignment="center" col_no="0" name="ITEM NO."/>
                    <bomcol alignment="center" col_no="1" name="PART NUMBER"/>
                    <bomcol alignment="center" col_no="2" name="DESCRIPTION"/>
                    <bomcol alignment="center" col_no="3" name="MATERIAL"/>
                    <bomcol alignment="center" col_no="4" name="STOCK SIZE"/>
                    <bomcol alignment="center" col_no="5" name="WEIGHT"/>
                    <bomcol alignment="center" col_no="6" name="VENDOR"/>
                    <bomcol alignment="center" col_no="7" name="Default/QTY."/>
                </bomheader>
                <bomrow document_id="2120" path="\EPDM Demo Files\0040-84339.sldasm" row_no="0">
                    <bomcell col_no="0" value="1"/>
                    <bomcell col_no="1" value="0040-84339"/>
                    <bomcell col_no="2" value="ROTOR, WAFER HEAD MK1"/>
                    <bomcell col_no="3" value=""/>
                    <bomcell col_no="4" value=""/>
                    <bomcell col_no="5" value=""/>
                    <bomcell col_no="6" value=""/>
                    <bomcell col_no="7" value="1"/>
                </bomrow>
                <bomrow document_id="2126" path="\EPDM Demo Files\0020-53948.sldprt" row_no="1">
                    <bomcell col_no="0" value="2"/>
                    <bomcell col_no="1" value="0020-53948"/>
                    <bomcell col_no="2" value="INSULATOR, ECHUCK CONTACT"/>
                    <bomcell col_no="3" value="PEEK"/>
                    <bomcell col_no="4" value=""/>
                    <bomcell col_no="5" value=""/>
                    <bomcell col_no="6" value=""/>
                    <bomcell col_no="7" value="2"/>
                </bomrow>
                <bomrow document_id="2125" path="\EPDM Demo Files\0020-53949.sldprt" row_no="2">
                    <bomcell col_no="0" value="3"/>
                    <bomcell col_no="1" value="0020-53949"/>
                    <bomcell col_no="2" value="HIGH VOLTAGE CONTACT"/>
                    <bomcell col_no="3" value=""/>
                    <bomcell col_no="4" value=""/>
                    <bomcell col_no="5" value=""/>
                    <bomcell col_no="6" value=""/>
                    <bomcell col_no="7" value="2"/>
                </bomrow>
                <bomrow document_id="2115" path="\EPDM Demo Files\9010-01765-1.sldprt" row_no="3">
                    <bomcell col_no="0" value="4"/>
                    <bomcell col_no="1" value="3700-04467"/>
                    <bomcell col_no="2" value="O-RING,  BUNA-N 2-011 70 DURO"/>
                    <bomcell col_no="3" value="-"/>
                    <bomcell col_no="4" value=""/>
                    <bomcell col_no="5" value=""/>
                    <bomcell col_no="6" value="PARKER SEALS"/>
                    <bomcell col_no="7" value="2"/>
                </bomrow>
                <bomrow document_id="2119" path="\EPDM Demo Files\3690-05375.sldprt" row_no="4">
                    <bomcell col_no="0" value="5"/>
                    <bomcell col_no="1" value="3690-05375"/>
                    <bomcell col_no="2" value="SET SCR CUP PT STEEL,  M2.5 X 5"/>
                    <bomcell col_no="3" value="STEEL"/>
                    <bomcell col_no="4" value=""/>
                    <bomcell col_no="5" value=""/>
                    <bomcell col_no="6" value="STOCK DRIVE"/>
                    <bomcell col_no="7" value="2"/>
                </bomrow>
                <bomrow document_id="2117" path="\EPDM Demo Files\3700-02453.sldprt" row_no="5">
                    <bomcell col_no="0" value="6"/>
                    <bomcell col_no="1" value="801655-150"/>
                    <bomcell col_no="2" value="O-RING, BUNA N 2-150 N674-70"/>
                    <bomcell col_no="3" value=""/>
                    <bomcell col_no="4" value=""/>
                    <bomcell col_no="5" value=""/>
                    <bomcell col_no="6" value=""/>
                    <bomcell col_no="7" value="1"/>
                </bomrow>
                <bomrow document_id="2118" path="\EPDM Demo Files\3700-01044.sldprt" row_no="6">
                    <bomcell col_no="0" value="7"/>
                    <bomcell col_no="1" value="3700-01044"/>
                    <bomcell col_no="2" value="O-RING 2-224 BUNA-N"/>
                    <bomcell col_no="3" value="-"/>
                    <bomcell col_no="4" value=""/>
                    <bomcell col_no="5" value=""/>
                    <bomcell col_no="6" value="Parker Seals"/>
                    <bomcell col_no="7" value="2"/>
                </bomrow>
                <bomrow document_id="2116" path="\EPDM Demo Files\3700-98003.sldprt" row_no="7">
                    <bomcell col_no="0" value="8"/>
                    <bomcell col_no="1" value="3700-98003"/>
                    <bomcell col_no="2" value="O-RING, 2-011 BUNA-N"/>
                    <bomcell col_no="3" value="RUBBER"/>
                    <bomcell col_no="4" value=""/>
                    <bomcell col_no="5" value=""/>
                    <bomcell col_no="6" value="Parker Seals"/>
                    <bomcell col_no="7" value="1"/>
                </bomrow>
                <bomrow document_id="2127"
                    path="\EPDM Demo Files\Additional File Folder\0020-53947.sldprt" row_no="8">
                    <bomcell col_no="0" value="9"/>
                    <bomcell col_no="1" value="0020-53947"/>
                    <bomcell col_no="2" value=""/>
                    <bomcell col_no="3" value=""/>
                    <bomcell col_no="4" value=""/>
                    <bomcell col_no="5" value=""/>
                    <bomcell col_no="6" value=""/>
                    <bomcell col_no="7" value="1"/>
                </bomrow>
            </bom>
        </transaction>
    </transactions>
</xml>

0 个答案:

没有答案