Ver Mensaje Individual
  #8 (permalink)  
Antiguo 12/09/2014, 06:16
marr_Th_
 
Fecha de Ingreso: febrero-2013
Mensajes: 21
Antigüedad: 11 años, 8 meses
Puntos: 1
Respuesta: parsear HTML con php

bueno señores

he avanzado algo ahora muestra todas las etiquetas que quiero pero no respeta que el valor de la columna izquierda se corresponda con el de la derecha si no que muesta lo siguiente.

Panel Brand :Panel Brand :Panel Model :Panel Type :Application :Operating Temperature :Storage Temperature :RoHS :Specific Feature :,SAMSUNG SMD|LMS500HF07| a-Si TFT-LCD , Panel | ,Portable Navigation Device,Pocket TV,MP4 PMP|-20 ~ 70 °C |-40 ~ 85 °C | ,RoHS Compliance| ,Wide Viewing Angle,White LED Backlight,With Touchscreen,Sunlight Readable,Wide Aspect RatioPanel Size :Dot Resolution :Pixel Configuration :Aspect Ratio :Form Factor :Pixel Pitch :Active Area :Touch Panel :|5.0 inch |480*272(RGB) (WQVGA)| RGB Horizontal Stripe |16:9 (W:H)|Flat Display|0.231*0.231 mm (W*H)|110.88*62.832 mm (W*H)|Embeded (4-wire Resistive, Film / Glass)Display Mode :Contrast Ratio :Display Color :Response Time :Viewing Angle :Viewing Direction :White color Chromaticity :Sunlight Readable :|VA, Normally Black, TMR ,[Panelook copyright, copy is strictly prohibited] IPS Family: AAS, ADS, AHVA, FFS, IPS, PLS, SFT VA Family: ASV, HVA, MVA, PVA, SVA, VA|800 : 1 (Typ.) (Transmissive)|16.7M (8-bit) |17/15 (Typ.)(Tr/Td)|80/80/80/80 (Typ.)(CR≥10) (L/R/U/D)|Symmetry|X:0.320; Y:0.340|Sunlight ReadableVertical Frequency :Reverse Scan :|60Hz ,[Panelook copyright, copy is strictly prohibited] 120Hz (60HZ Input) : Embedded MEMC Circuit 120Hz+120Hz : 120Hz Panel+120Hz Backlight 240Hz (60HZ Input) : Embedded MEMC Circuit|NoLamp Position :Lamp Type :Lamp Shape :Interface Type :|Edge light type|WLED|Array|Included in panel signal interfaceSignal Category :Signal Class :Input Voltage for Panel :Interface Type :|Parallel RGB|Parallel RGB (1 ch, 8-bit)|3.3V (Typ.)|FPCPanelook Updated :Disclaimer :|2014-09-02 11:29|The above parameters are inputted by electronic engineers according to the datasheet, every effort has been made to reduce errors, but we can not guarantee the parameter is entirely correct.Customer Sample (CS) :Mass Production (MP) :Late Time Order (LTB) :Last Time Shipment (LTS) :Production State Now :|--|--|--|--| Discontinued ,

ahora el codigo esta asi por si a alguien le interesa:

Código PHP:
define'_JEXEC');
define'DS'DIRECTORY_SEPARATOR );
define('JPATH_BASE'dirname(__FILE__) );

require_once ( 
JPATH_BASE .DS.'simple_html_dom.php' );





    
$html file_get_html('http://localhost/panelook/mia_parser/panel.html');



    for(
$k=0;$k<9;$k++){
    
$divContenedor $html->find('div.tabwrapB',$k);
    if(
$divContenedor == null){
        
$divContenedor $html->find('div.tabwrapB');
        foreach(
$divContenedor as $div){
        foreach(
$div->find('th') as $campo){
            
$descripcion[] = "<p>".$campo->plaintext;
        }
        
$cont 0;
        foreach(
$div->find('td') as $campo){
            if( 
$campo->plaintext != ''){
            
$descripcion[$cont] .=  "|".$campo->plaintext."</p>";
            if(
$cont == 0)
                
            +
$cont;}if( $campo->plaintext == ''){
            foreach(
$campo->find('img') as $img){
                    
$descripcion[$cont] .=  "|".$img->title."</p>";
            if(
$cont == 0)
                
            +
$cont;}}if( $campo->plaintext != ''){
            foreach(
$campo->find('img') as $img){
                    
$descripcion[$cont] .=  "|".$img->title."</p>";
            if(
$cont == 0)
                
            +
$cont;}}
        }
    } }
    else{
        
        foreach(
$divContenedor->find('th') as $campo){
            
$descripcion[] = $campo->plaintext;
        }
        
$cont 0;
        foreach(
$divContenedor->find('th') as $campo){
            
            
$descripcion[$cont] .= $campo->plaintext;
            if(
$cont == 0)
                
            +
$cont;}
        foreach(
$divContenedor->find('td') as $campo){
            if( 
$campo->plaintext != ''){
            
$descripcion[$cont] .=  "|".$campo->plaintext;
            if(
$cont == 0)
                
            +
$cont;}if( $campo->plaintext == ''){
            foreach(
$campo->find('img') as $img){
                    
$descripcion[$cont] .=  ",".$img->title;
            if(
$cont == 0)
                
            +
$cont;}}if( $campo->plaintext != ''){
            foreach(
$campo->find('img') as $img){
                    
$descripcion[$cont] .=  ",".$img->title;
            if(
$cont == 0)
                
            +
$cont;}}
        }
    } }
$valor str_replace ('×','*',$descripcion[$cont]);
    echo 
$valor
alguna idea