JavaScript - Leer archivo xml desde html con javascript

 
Vista:
Imágen de perfil de Luis Ocampo

Leer archivo xml desde html con javascript

Publicado por Luis Ocampo (2 intervenciones) el 13/01/2017 16:39:10
Estimados,

Tengo un pequeño problema no puedo leer un archivo XML en una pagina HTML, lo necesito hacer con javascript

estos son los códigos en cuestion:

Archivo XML

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="../css/xml.css"?>
<lectoresCB>
	<lectorCB>
		<tipoLector>1D</tipoLector>
		<codigo>QSBUSBKLITEN</codigo>
		<modelo>Quickscan Lite USB</modelo>
		<interface>USB</interface>
		<imagen>Foto</imagen>
		<enlace>linl</enlace>
	</lectorCB>
	<lectorCB>
		<tipoLector>1D</tipoLector>
		<codigo>QSBUSBKLITERS</codigo>
		<modelo>Quickscan Lite Serial</modelo>
		<interface>Serial</interface>
		<imagen>Foto</imagen>
		<enlace>enlace</enlace>
	</lectorCB>
	<lectorCB>
		<tipoLector>1D</tipoLector>
		<codigo>QBT2131</codigo>
		<modelo>Quickscan QBT 2131</modelo>
		<interface>Bluetooth</interface>
		<imagen>Foto</imagen>
		<enlace>enlace</enlace>
	</lectorCB>
	<lectorCB>
		<tipoLector>2D</tipoLector>
		<codigo>QDT2430</codigo>
		<modelo></modelo>
		<interface>Quickscan QDT 2430</interface>
		<imagen>foto</imagen>
		<enlace>enlace</enlace>
	</lectorCB>
	<lectorCB>
		<tipoLector>2D</tipoLector>
		<codigo>QBT2430</codigo>
		<modelo>Quickscan QBT 2430</modelo>
		<interface>Bluetooth</interface>
		<imagen>Foto</imagen>
		<enlace>enlace</enlace>
	</lectorCB>
	<lectorCB>
		<tipoLector></tipoLector>
		<codigo></codigo>
		<modelo></modelo>
		<interface></interface>
		<imagen></imagen>
		<enlace></enlace>
	</lectorCB>
</lectoresCB>


pagina web:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<!DOCTYPE html>
 
<html lang="es">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Lectores</title>
        <link rel="stylesheet" type="text/css" href="css/desktop.css"/>
        <link rel="stylesheet" type="text/css" href="fonts/style.css"/>
        <script src="scripts/productos.js"></script>
 
    </head>
    <body>
        <div id="wrapper">
        <header>
        <div id="izq">
 
        </div>
        <div id="der">
            <h1 id="resultado">Lectores</h1>
            <nav>
            	<ul>
                	<a href="index.html"><li>Inicio</li></a>
                	<a href=""><li>Lectores</li></a>
                    <a href=""><li>Impresoras</li></a>
                    <a href=""><li>Handheld</li></a>
                    <a href=""><li>Tablet Robustas</li></a>
 
                </ul>
            </nav>
        </div>
        </header>
 
        <div id="section">
        	<table border="1">
    			<tr>
                	<th colspan="6"></th>
                </tr>
                <tr>
                	<td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                </tr>
                 <tr>
                	<td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                </tr>
                 <tr>
                	<td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                </tr>
                 <tr>
                	<td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                </tr>
                 <tr>
                	<td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                </tr>
                 <tr>
                	<td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                </tr>
 
 
         </table>
 
 
        </div>
 
 
 
 
        <footer>
        	<div id="fotIzq">
                <small>Desarrollado por Sourcecode<br/>&copy;Todos los derechos reservados 2016-2017 V1.1</small>
              </div>
              <div id="fotDer">
                <p>
                        <a href="http://jigsaw.w3.org/css-validator/check/referer">
                            <img style="border:0;width:88px;height:31px"
                                src="http://jigsaw.w3.org/css-validator/images/vcss-blue"
                                alt="¡CSS Válido!" />
                            </a>
                        </p>
           		</div>
        </footer>
	   </div>
	</body>
</html>
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
Imágen de perfil de Luis

Leer archivo xml desde html con javascript

Publicado por Luis (2 intervenciones) el 16/01/2017 20:04:45
Si, muchas gracias. paso un aviso. en google Chrome no se estan viendo los archivo xml leidos desde js. las pruebas se deben hacer con Mozilla
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar