iyi akşamlar sevgili Toplum,
Peki her şeyden önce: Navidad felize - Sana bir Mutlu Noeller istiyorum! Benim sezon aradan i biraz ayrıştırıcı-senaryo üzerinde çalışıyorsun duyuyorum.
Today i'm trying to debug a little DOMDocument object in php. Ideally it'd be nice if I could get DOMDocument to output in a array-like format, to store the data in a database!
Benim örnek: head over to the url - see the example: the target
Ben bloğunda veriyi filtrelemek istiyorum:
Schulart: BBS
Schulnummer:60119
Anschrift: Berufsbildende Schule Boppard Antoniusstr. 21; 56154 Boppard
Telefon: (0 67 42) 80 61-0
Telefax: (0 67 42) 80 61-29
E-Mail: sekretary@bbs-boppard.de
Internet: website
Träger:Kreisverwaltung Rhein-Hunsr�ck-Kreis
letzte Änderung: 08 Feb 2010 14:33:12 von 60119
I have investigated the sourcecode - and found out that the attribute of interest should
be this one:
class="content"div class="content"><!-- TYPO3SEARCH_begin -->
or even better: wfqbeResults
I DOMDucument şekilde çalıştırmak Yani ben şöyle kullanabilirsiniz:
$dom->getElementById('wfqbeResults');
burada kodu: - Benim rotaları
<?php
$dom = new DOMDocument();
@$dom->loadHTMLFile(' -> here the website goes in<- ');
$divElement = $dom->getElementById('wfqbeResults');
$innerHTML= '';
$children = $divElement->childNodes;
foreach ($children as $child) {
$innerHTML .= $child->ownerDocument->saveXML( $child );
}
echo $innerHTML;
<?
Duhh: this outputs lot of garbage. The code spits out a lot of html anyway. I have to overhaul the code a bit to get the wanted 9 lines out of the parser:
what is aimed: i aşağıdaki çıkmak istiyorum:
a. 9 lines with nine labels and nine values. b. I want to prepare the output to store it in a MySQL-DB!
Look forward to some hints greetings zero