Dab tsi yog txoj hlua khiav rau tus cwj pwm '<'?
Dab tsi yog txoj hlua khiav rau tus cwj pwm '<'?

Video: Dab tsi yog txoj hlua khiav rau tus cwj pwm '<'?

Video: Dab tsi yog txoj hlua khiav rau tus cwj pwm '<'?
Video: Saib Mis paub Poj niam (hluas nkauj) tus yam ntxwv lub siab 2024, Hlis ntuj nqeg
Anonim

XML khiav tawm cov cim

Cov cim tshwj xeeb dim daim ntawv tau hloov los ntawm
Ampersand & &
Tsawg dua < <
Loj dua > >
Cov lus hais " "

Kuj nug, dab tsi yog txoj hlua khiav rau tus cwj pwm '<'?

XML khiav tawm cov cim

Cov cim tshwj xeeb dim daim ntawv tau hloov los ntawm
Ampersand & &
Tsawg dua < <
Loj dua > >
Cov lus hais " "

Tsis tas li ntawd, cov cim dab tsi yuav tsum tau khiav tawm? Nrog lub plhaub raug (ksh, bash lossis zsh), koj yuav tsum tau hais cov cim hauv qab no tsawg kawg yog qee qhov xwm txheej.

  • Whitespace (chaw, tab, kab tshiab - nco ntsoov tias cov kab ntawv tshiab tsis tuaj yeem hais nrog lub backslash).
  • !
  • "- plhaub syntax.
  • # - tawm tswv yim pib thaum ua ntej los ntawm qhov chaw dawb; zsh qus.
  • $ - plhaub syntax.

Ib yam li ib tug yuav nug, dab tsi yog tus cwj pwm rau txoj hlua khiav hauv XML?

XML khiav cov cim Tsuas muaj tsib: "" ' ' > & Escaping cov cim nyob ntawm qhov tshwj xeeb tus cwj pwm yog siv. Cov piv txwv tuaj yeem raug lees paub ntawm W3C Markup Validation Service.

Dab tsi yog cov cim tshwj xeeb hauv XML?

Siv Cov Cim Tshwj Xeeb hauv XML

Symbol (npe) Kev khiav tawm ib ntus
> (ntau tshaj) > los yog >
& (ampersand) &
' (apostrophe lossis ib nqe lus hais) '
"(ob-txoj kev) "

Pom zoo: