Yuav Ua Li Cas Rau Nruab Ib Cov Ntawv XML

Cov txheej txheem:

Yuav Ua Li Cas Rau Nruab Ib Cov Ntawv XML
Yuav Ua Li Cas Rau Nruab Ib Cov Ntawv XML

Video: Yuav Ua Li Cas Rau Nruab Ib Cov Ntawv XML

Video: Yuav Ua Li Cas Rau Nruab Ib Cov Ntawv XML
Video: Yuav ua li cas thiaj thov tau daim ntawv tso cai los qhib business nyob rau lub nroog Minneapolis 2024, Kaum ib hlis
Anonim

XML - eXtensible Markup Language - txhais tau tias "txuas lus ntawm kev ua lub teb chaw", thiab tus qauv no tau tsim los txhawm rau qhia cov kev cai sib txawv rau kev sau cov ntaub ntawv rau cov ntawv sau. Txoj kev khaws cov ntaub ntawv no tsis yog tsim rau cov ntaub ntawv ntau. Nws yog siv, piv txwv, txhawm rau pauv cov ntaub ntawv ntawm ntau lub program lossis khaws cov ntaub ntawv tsis tu ncua tso tawm ntawm cov nplooj ntawv web.

Yuav ua li cas rau nruab ib cov ntawv XML
Yuav ua li cas rau nruab ib cov ntawv XML

Cov Lus Qhia

Kauj ruam 1

XML cov ntaub ntawv tsis tuaj yeem ua tiav; nws tsuas yog muaj cov ntaub ntawv tsim hauv cov ntawv uas tau siv los ntawm txhua daim ntaub ntawv thaum lawv ua haujlwm. Piv txwv, qee zaum xws li cov ntawv xav tau thaum txhim kho cov phiaj xwm, plugins rau lawv, ntxiv "tawv", thiab lwm yam. Hauv qhov no, XML ntawv yuav tsum tau muab tso rau hauv cov nplaub tshev uas daim ntawv thov yuav tsum saib rau nws thaum lub sijhawm txheej txheem teeb lossis thaum npaj los qhia cov ntaub ntawv ntawm lub vijtsam. Tshawb nrhiav qhov chaw nyob ntawm daim ntawv no ntawm cov phiaj xwm lossis cov lus qhia teeb tsa. Yog tias cov ntawv XML tau siv los ntawm txhua tus ntawv sau (piv txwv, hauv cov txheej txheem kev tswj hwm cov ntsiab lus), koj tuaj yeem pom txoj hauv kev rau nws hauv kab ntawv ntawm tsab ntawv code. Qee zaum cov web thov uas nrhiav tsis tau cov ntawv XML yuav muab cov lus yuam kev - nws kuj tseem yuav muaj tag nrho txoj hauv kev rau cov khoom siv uas ploj lawm.

Kauj ruam 2

Thaum koj paub qhov chaw ntawm cov ntaub ntawv, luam nws nyob ntawd, thiab tom qab ntawd khiav cov ntawv thov. Qhov no yuav yog txheej txheem ntawm kev txhim kho cov ntawv XML.

Kauj ruam 3

Cov ntaub ntawv ntawm hom no tseem tuaj yeem siv los hloov chaw rau cov nplooj ntawv website. Hauv qhov no, rau kev teeb tsa, koj yuav tsum sau npe rau cov lus qhia tsim nyog hauv cov teeb tsa server, lossis siv lwm hom lus - XSL (eXtensible Stylesheet Language). Nws yog tsim los tsim cov cai rau kev ua tiav cov ntaub ntawv muaj nyob hauv cov ntawv XML rau qhov browser. Yog tias cov ntaub ntawv uas koj xav tau los nruab muab lub peev xwm tsim tawm rau qhov browser, cov ntaub ntawv no yuav tsum yog ntau tshaj ib qho - pob khoom yuav tsum tau suav nrog ib qho sib xyaw nrog cov tsig txuas ntxiv. Yog tias nws tsis nyob ntawd, qhib cov ntawv XML nyob hauv ib phau ntawv nyeem, hauv kab uas pib nrog <? Xml-stylesheet, nyeem lub npe ntawm cov ntaub ntawv uas ploj lawm thiab nrhiav nws.

Kauj ruam 4

Muab ob qho tib si cov ntaub ntawv ntawm tus neeg rau ntawm koj lub xaib. Hauv txoj kab uas tau hais hauv kauj ruam dhau los, qhia meej qhov chaw nyob ntawm cov ntawv pabcuam XSL cov ntaub ntawv - nws yuav xav tau cia rau hauv qee qhov subfolder. Hauv qhov no, ob qho tsim cov phau ntawv xav tau lossis kho qhov chaw nyob. Qhov kev tso kawm raug ntawm ob cov ntaub ntawv no yuav yog qhov teeb tsa ntawm XML ntawv los qhia nws cov ntsiab lus hauv qhov browser window.

Pom zoo: