CATEGORII DOCUMENTE |
Asp | Autocad | C | Dot net | Excel | Fox pro | Html | Java |
Linux | Mathcad | Photoshop | Php | Sql | Visual studio | Windows | Xml |
DOCUMENTE SIMILARE |
|||
|
|||
It's a simple matter to import more than one file with the same structure into an HTML file. Basically, you just need to repeat the operation, making sure that the uniqueness of target tag names and variables is preserved.
Listing 2.5 contains an XML file whose structure matches that of the ones used so far. The values of the data components have been changed so that they can be differentiated from the others when read by the HTML files.
Note that this data has the same structure as that of the other XML files; the differences are in the data values.
The next step is to create a program that will read in the data of both XML files. It will be necessary to create two instances of the xmldom object, one for each file. You'll also create another set of <span> tags in the HTML section to serve as the targets of the extracted data.
Listing 2.6 is a modification of the previous one. It has been altered to read the data from two XML files having the same form. All changes from the previous one are marked in bold.
When you run the file, note that the output that appears in the document window is the data from the two message files. This output is illustrated in Figure 2.4.
Line 6 declares the second instance of the xmldom object needed for the second XML file. Lines 9 and 10 create the object and the file's attachment.
In lines 33 to 38, the second xmldom object is used to extract the data from the file and insert it into the second set of <span> tags.
Lines 50 to 52 create a separation between the two sets of <span> tags, and lines 53 to 58 define the second target set of tags.
Delivered
for Juan Ignacio Velazquez Gonzalez |
Last updated on 9/12/2001 |
Politica de confidentialitate | Termeni si conditii de utilizare |
Vizualizari: 1458
Importanta:
Termeni si conditii de utilizare | Contact
© SCRIGROUP 2024 . All rights reserved