Cov txheej txheem:

XML cov yam ntxwv thiab cov ntsiab lus yog dab tsi?
XML cov yam ntxwv thiab cov ntsiab lus yog dab tsi?

Video: XML cov yam ntxwv thiab cov ntsiab lus yog dab tsi?

Video: XML cov yam ntxwv thiab cov ntsiab lus yog dab tsi?
Video: Vajtswv Txojlus uas muaj 66 phau, puavleej sau haistxog ib lub ntsiab lus, ib phauntawv xwb EP.3 2024, Tej zaum
Anonim

Yam ntxwv yog ib feem ntawm XML cov ntsiab lus . Ib keeb tuaj yeem muaj ntau yam tshwj xeeb yam ntxwv . Yam ntxwv muab cov lus qhia ntxiv txog XML cov ntsiab lus . Yuav kom meej meej, lawv txhais cov khoom ntawm cov ntsiab lus . Ib XML attribute ib txwm yog ib lub npe-tus nqi khub.

Ib yam li ntawd, koj tuaj yeem nug, dab tsi yog tus cwj pwm hauv XML?

XML Attributes . XML attributes feem ntau yog siv los piav qhia XML cov ntsiab lus, los yog muab cov ntaub ntawv ntxiv txog cov khoom. Feem ntau, los yog feem ntau, yam ntxwv yog siv los muab cov ntaub ntawv uas tsis yog ib feem ntawm cov ntsiab lus ntawm lub XML document.

Tsis tas li ntawd, XML tus cwj pwm tsim li cas? Ib tus cwj pwm yuav tsum tau tshaj tawm siv lub tus cwj pwm -cov ntawv tshaj tawm hauv DTD (Cov Ntaub Ntawv Hom Txhais). Ib tus cwj pwm element yog siv yam tsis muaj lus hais thiab cov tus cwj pwm tus nqi yog siv rau hauv ib qho ('') lossis ob nqe lus hais (""). Ib tus cwj pwm lub npe thiab nws tus nqi yuav tsum ib txwm tshwm sim hauv khub.

Yog li ntawd, cov ntsiab lus ntawm XML yog dab tsi?

XML cov ntsiab lus tuaj yeem txhais tau tias yog lub tsev blocks ntawm ib qho XML . Cov ntsiab lus tuaj yeem coj tus cwj pwm los tuav cov ntawv, cov ntsiab lus , tus cwj pwm, cov khoom siv xov xwm lossis tag nrho cov no. Txhua XML cov ntaub ntawv muaj ib lossis ntau dua cov ntsiab lus , qhov Scope ntawm uas yog delimited los ntawm pib thiab xaus tag, los yog rau khoob cov ntsiab lus , los ntawm qhov khoob- keeb tag.

Yuav ua li cas yog lub naming conventions rau XML ntsiab?

XML cov ntsiab lus yuav tsum ua raws li cov cai teev npe no:

  • Cov npe ntawm cov ntsiab lus tseem ceeb.
  • Cov npe ntawm cov ntsiab lus yuav tsum pib nrog ib tsab ntawv lossis underscore.
  • Cov npe tsis tuaj yeem pib nrog cov ntawv xml (lossis XML, lossis Xml, thiab lwm yam)
  • Cov npe ntsiab lus tuaj yeem muaj cov tsiaj ntawv, lej, hyphens, underscores, thiab lub sijhawm.
  • Cov npe khoom tsis tuaj yeem muaj qhov chaw.

Pom zoo: