开发者

xml xpath read big file, from one part to other

开发者 https://www.devze.com 2023-01-31 06:49 出处:网络
I have very long xml file, like this: <cars> <car> <name>Ford</name> <number>F33</number>

I have very long xml file, like this:

<cars>
    <car>
        <name>Ford</name>
        <number>F33</number>
        <color>Blue</color>
    </car>
    <car>
        <name>Ford</name>
        <number>F43</number>
        <color>Red</color>
    </car>
    <car>
        <name>Ford</name>
        <number>F53</number>
        <color>Red</color>
    </car>  
    <car>
        <name>Audi</name>
        <number>A001</number>
        <color>Red</color>
    </car>
    <car>
        <name>Audi</name>
        <number>A032</number>
        <color>White&开发者_如何学JAVAlt;/color>
    </car>
       .......
</cars>

How with php xpath read from one part to ather.

For example like sql LIMIT 10, 30 show elemens from 10 to 30


How with php xpath read from one part to ather.

For example like sql LIMIT 10, 30 show elemens from 10 to 30

Use:

/*/car[position() > 9 and not(position() > 30)]
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号