如何在XML文件中获取数据

时间:2018-04-29 01:14:34

标签: javascript xml

这是我正在使用的XML

<?xml version="1.0" encoding="utf-8" ?>
<body copyright="All data copyright Rutgers University 2018.">
<predictions agencyTitle="Rutgers University" routeTitle="Weekend 2" routeTag="wknd2" stopTitle="Quads" stopTag="quads">
    <direction title="To College Avenue Student Center">
        <prediction epochTime="1524963905243" seconds="1108" minutes="18" isDeparture="false" affectedByLayover="true" dirTag="wknd2_inbound" vehicle="4182" block="WK2R04" />
        <prediction epochTime="1524964318276" seconds="1522" minutes="25" isDeparture="false" affectedByLayover="true" dirTag="wknd2_inbound" vehicle="4193" block="WK2R05" />
        <prediction epochTime="1524965394210" seconds="2597" minutes="43" isDeparture="false" affectedByLayover="true" dirTag="wknd2_inbound" vehicle="4199" block="WK2R06" />
        <prediction epochTime="1524966949586" seconds="4153" minutes="69" isDeparture="false" affectedByLayover="true" dirTag="wknd2_inbound" vehicle="4182" block="WK2R04" />
        <prediction epochTime="1524967794210" seconds="4997" minutes="83" isDeparture="false" affectedByLayover="true" dirTag="wknd2_inbound" vehicle="4193" block="WK2R05" />
    </direction>
</predictions>

如何使用javascript以“分钟”获取数据?

0 个答案:

没有答案