Rev 320 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 320 | Rev 330 | ||
---|---|---|---|
Line 245... | Line 245... | ||
245 | 245 | ||
246 | } |
246 | } |
247 | 247 | ||
248 | 248 | ||
249 | $xpath = new DOMXpath($dom); |
249 | $xpath = new DOMXpath($dom); |
250 | $nodelist = $xpath->query('//selector|// |
250 | $nodelist = $xpath->query('//selector|//combiner|//combiner3'); |
251 | $cnt=1; |
251 | $cnt=1; |
252 | foreach ($nodelist as $plist) { |
252 | foreach ($nodelist as $plist) { |
253 | $newnode=$dom->createElement("plist","$cnt"); |
253 | $newnode=$dom->createElement("plist","$cnt"); |
254 | $fstart->appendChild($newnode); |
254 | $fstart->appendChild($newnode); |
255 | $newnode=$dom->createElement("id","$cnt"); |
255 | $newnode=$dom->createElement("id","$cnt"); |
256 | $plist->appendChild($newnode); |
256 | $plist->appendChild($newnode); |
257 | $cnt++; |
257 | $cnt++; |
258 | } |
258 | } |
259 | 259 | ||
260 | $nodelist = $xpath->query('//list|//list1|// |
260 | $nodelist = $xpath->query('//list|//list1|//list2|//list3'); |
261 | $cnt=1; |
261 | $cnt=1; |
262 | foreach ($nodelist as $plist) { |
262 | foreach ($nodelist as $plist) { |
263 | if( $plist->childNodes->length === 0){ |
263 | if( $plist->childNodes->length === 0){ |
264 | $newnode=$dom->createTextNode("-1"); |
264 | $newnode=$dom->createTextNode("-1"); |
265 | $plist->appendChild($newnode); |
265 | $plist->appendChild($newnode); |