Thu thuat tao file XML trong Word 2003.

PhanVien.Com . Bai Viet . Cong Nghe Thong Tin . Kien Thuc Tin Hoc Co Ban . Thu thuat tao file XML trong Word 2003.

Thu thuat tao file XML trong Word 2003

Khi su dung XML, ban co the luu tru du lieu theo dinh dang file
ma nhieu phan mem khac cung ho tro. Va file nay khong chi chua du lieu
ma con chua ca mot ban mo ta tai lieu trong mot file van ban thuan..

Thu thuat tao file XML trong Word 2003 - Ban co dau.
Thu thuat tao file XML trong Word 2003 - Ban khong dau.
Sponsored links:

Thu thuat tao file XML trong Word 2003.

Do do du kieu nay co the tai su dung vi nhung ung dung co the doc van ban  thuan deu co the doc duoc du lieu. Nhung nhieu nguoi lai cho rang Word khong phai la cong cu thich hop de chinh sua file XML, nhung nhung thu thuat duoi day se giup ban chinh sua file XML tren Word rat hieu qua.

1. Su dung moi File Word

Hau het moi ung dung deu mac dinh dinh dang  file trong hop thoai Save va Open. Vi du, Word 2003 mac dinh dinh dang  file la .doc. Neu muon mo mot loai file khac voi cai dat mac dinh ban phai mo danh sach tha xuong cua File Of Type, lua chon loai file sau do de Word cap nhat danh sach. Ban co the rut ngan cong doan nay neu cai dat mac dinh cho Word hien thi nhung file XML bang cach lua chon muc All Word Documents trong danh sach File As Type. Sau do, Word se hien thi file XML trong hop danh sach Name, va nhung cai dat nay se duoc luu lai.

2. Luu voi dinh dang  *.xml

Theo mac dinh, Word se luu file theo dinh dang  .doc. Neu chi lam viec  voi file XML, ban phai nho thay doi cai dat moi khi luu file. Tuy nhien co mot cach giup ban khong phai luon ghi nho dieu do bang cach cai dat cho Word tu dong luu tai lieu  duoi dinh dang  XML:

  • Vao menu Tool\ Options.
  • Chon tab Save.
  • Trong danh sach tha xuong cua Save Word File As, lua chon dinh dang  cua XML la *.xml.
  • Sau do click OK.

3. Thay doi thuoc tinh

Khi mo mot tai lieu  XML, Word se hien thi tag va noi dung, ngoai ra no con mo cua so tac vu XML Structure. Nhung nhung thuoc tinh nay nam o dau? De xem cac thuoc tinh, ban chi can phai chuot len mot phan tu va lua chon Attributes, sau do se xuat hien hop thoai Attributes For Item. De thay doi gia tri, lua chon mot thuoc tinh trong danh sach Assigned Attributes va hieu chinh gia tri  trong hop Value.

Neu phan tu nay co nhieu gia tri, hop thoai se khong chi ra gia tri dang cai dat. De tranh rac roi, ban nen lua chon truoc phan tu can cai dat sau do moi mo hop thoai Attributes For Item.

4. Tim kiem tuy chon

Word cho phep ban kiem soat cac tac vu tren file XML, nhung rat kho tim thay nhung tuy chon thuc hien cau hinh. Ban co the tim nhung tuy chon nay theo cach pho thong sau:

  • Chon tab XML Schema
  • Click nut XML Options de mo hop thoai XML Options.

Ngoai ra co mot cach don gian hon de mo hop thoai XML Options do la click vao lien ket XML Options o phan duoi cung cua cua so tac vu XML Structure. Nhung can nho rang nhung tuy chon nay chi lam viec  voi tai lieu  hien thoi. Ban phai thiet lap lai chung khi mo mot file XML khac.

5. Chinh sua de dang

Neu muon chinh sua noi dung  hien thoi ban khong can su dung den tag, vi ban co the xoa nham tag. De tat bo tag trong khi chinh sua, bo tuy chon Show XML Tags In The Document trong cua so tac vu XML Structure. Ban chi can nhap gia tri  mong muon de thay doi gia tri. De xoa gia tri, ban can lua chon moi tag tu tag dau den tag cuoi. Neu xoa mot gia tri ma khong xoa cac tag cua phan tu thi ban se tao ra mot phan tu rong.

Hoac ban co the chuyen doi cai dat tag an hoac hien bang cach an to hop phim Ctrl+Shift+X.

6. Hien thi phan tu rong

Tot nhat ban nen tranh tao ra nhung phan tu rong, tuy nhien cung co nhung truong hop ngoai le. Du da lua chon tuy chon Show XML Tags In The Document, nhung vi mot so loi ma tag cung khong hien thi duoc. Neu muon an di nhung ten phan tu nhung van muon biet khi mot phan tu bi rong, ban hay su dung trinh giu cho:

  • Chon tab XML Schema
  • Chon tiep XML Options
  • Kiem tra tuy chon Show Placeholder Text For All Empty Elements trong danh sach tuy chon AML View
  • Sau do Click OK hai lan.

7. Tranh mat du lieu


Qua trinh chuyen doi dinh dang  se quyet dinh  du lieu  trong tai lieu Word. Neu qua trinh chuyen doi khong phu hop voi du lieu  trong file ban dang mo thi du lieu  do khong hien thi duoc tren file do. Trong truong hop nay, qua trinh chuyen doi giong nhu qua trinh loc du lieu. Vi du, ban co the su dung viec chuyen doi de tao ra mot danh sach san pham  va gia ca. Mot qua trinh chuyen doi khac co the bao gom ten san pham, gia va thong tin  mo ta san pham. Thay vi mo file goc va tu xoa du lieu khong can thiet, qua trinh chuyen doi se tu dong thuc hien nhung thao tac do neu ap dung chuyen doi khi ban mo file goc.

De mo mot file ap dung chuyen doi, lua chon Open With Transform tu danh sach tha xuong cua nut Open (trong hop thoai Open). Ngoai ra ban cung co the ap dung chuyen doi khi luu file: Trong hop thoai Save As, lua chon XML Document cua tuy chon File As Type, chon tiep tuy chon Apply Transform, sau do click nut Transform de lua chon loai chuyen doi muon su dung.

Can nho rang, qua trinh chuyen doi khong chi thay doi file dang mo ma con thay doi ca tai lieu  goc trong Word. Neu luu file dang mo, nhung thay doi cung duoc luu vao file goc. Va neu ap dung chuyen doi cho fila dang luu, thi chuyen doi nay cung duoc luu vao file goc. VI vay de tranh mat du lieu  hoac thay doi file goc, hay luu nhung file chuyen doi duoi mot ten moi.

8. Tai XML Reference Schemas

Neu muon dung Word de viet code  tao dinh dang  XML, ban can tai Office 2003 XML Reference Schemas hay System Office 2007: XML Schema Reference. Day la nhung file tro giup lam viec  voi cau truc XML trong Word. Sau khi tai, mo nhung file .chm trong trinh duyet  de xem va tham chieu trong khi lam viec. Neu can chia se  file XML cho nhung nguoi khac, ban nen su dung Word 2003: XML Viewer.

9. Tat bo vung ten

Doi khi nhung ten phan tu trong hop thoai XML Structure rat dai va vo nghia vi bang hien thi vung ten trong ten phan tu duoc cai dat mac dinh.


De loai bo vung ten ban chi can thuc hien cac thao tac sau:
  • Click lien ket XML Options phia duoi cua cua so tac vu XML Structure.
  • Trong danh sach tuy chon, lua chon tuy chon Hide Namespace Alias In XML Structure.
  • Sau do click OK.
Sau do cua so tac vu XML Structure tro thanh:


10. Chong xoa nhung phan tu cua XML


Co the mot tai lieu  XML se co nhieu nguoi tham gia chinh sua. Trong truong hop nay ban co the su dung mot tinh nang cua tai lieu  XML de bao ve nhung tag cua XML trong khi cho phep nhung nguoi khac chinh sua noi dung hien thoi. Thuc hien cac thao tac sau:
  • Lua chon tuy chon Show XML Tags In The Document trong cua so tac vu XML Structure.
  • Chon muc Protect Document trong menu Tool.
  • Lua chon tuy chon Allow Only This Type Of Editing In The Document trong vung Editing Restriction cua cua so tac vu Protect Document.
  • Lua chon tiep No Changes (Read Only – chi doc). Day la tuy chon duoc cai dat mac dinh.
  • Trong tai lieu, lua chon nhung noi dung  cua mot phan tu.
  • Sau do chon tuy chon Everyone trong muc Exceptions cua cua so tac vu Protect Document. Theo hinh I.
  • Thuc hien lai buoc 5 va 6 voi moi tag XML chua du lieu  ban cho phep nguoi khac chinh sua.
  • Sau do click Yes, Start Enforcing Protection.
  • De dat mat khau  bao ve tai lieu, ban nhap mat khau  vao o Password va Retype Password; de ma hoa tai lieu, click vao User Authentication.
  • Thuc hien xong click OK.

11. Mo file XML trong Office  2007


Nhung ung dung trong Office  2007 cung su dung nhung file Office Open XML Format. Nhung file nay su dung phuong phap nen ZIP. Neu ban muon xem file Word, Excel hay Power  Point (2007) duoi dang tai lieu  XML, thay doi duoi mo rong cua nhung file nay thanh ZIP, sau do mo nhung file nay trong Windows  Explorer ban se thay nhung folder sau:
  • Folder chua tai lieu  chinh luu tru  nhung file da phuong tien (hinh anh, am thanh, …) va file noi dung  cua tai lieu. No cung luu tru  nhieu loai phan tu cua tai lieu  nhu: cai dat, chu de, va header.
  • File [Content_Types].xml chua dinh nghia nhung loai noi dung.
Su dung duoi mo rong ZIP, ban co the tim hieu rat nhanh ve tai lieu. Nhung ban khong nen thay doi cau truc folder hay thay doi ten file khi dang mo.


<

Sponsored links:

Theo QUANTRIMANG.COM

Updated: 28/07/2009 | Views: 494 | Comments: 0

Read full: Thu thuat tao file XML trong Word 2003

Post your comment about Thu thuat tao file XML trong Word 2003 go to this page.

Read more about Thu thuat tao file XML trong Word 2003

Your comment will be displayed here Thu thuat tao file XML trong Word 2003. Comment title Thu thuat tao file XML trong Word 2003 . Thu thuat tao file XML trong Word 2003 Cong Nghe Thong Tin in category Kien Thuc Tin Hoc Co Ban.

Comments on Thu thuat tao file XML trong Word 2003

Hien tai chua co binh luan nao ve bai viet Thu thuat tao file XML trong Word 2003!

Ban co y kien gi ve bai viet Thu thuat tao file XML trong Word 2003 nay? Hay goi suy nghi, binh luan, danh gia, loi khuyen ... cua ban ve bai viet Thu thuat tao file XML trong Word 2003 ban tai day.

Tin Tuc Online - Bai Moi

Phan Vien
Ket noi voi nha phat trien ung dung phan mem Phan Vien tren Facebook!
Phanvien | Mobile Version | Contact Us | Terms of Use | Privacy Policy | Refresh
Copyright © 2006 - 2013 PhanVien.Com . All rights reserved.
Cached: IP: 157.55.35.113, 18 February, 2013 06:52:01 (GMT +7 HANOI - VIETNAM).