Creating an XML Document

graphics/microsoftoffice57.gif

XML (Extensible Markup Language) is a universal language that enables you to create documents in which data is stored independently of the format so you can use the data more seamlessly in other forms. XML is fully supported in Microsoft Office Word 2003. XML allows you to work with the familiar Office interface and create and save documents as XML, without ever knowing the XML language. When you work with XML, you can attach a Word XML Schema (called WordML) or XML Schema (created by a developer) ”a set of rules that defines the elements and content used in an XML document ”and validate the data against it. Word allows you to open , view, modify, and save XML files and data.

Attach or Separate a Schema

graphics/one_icon.jpg

Click the Tools menu, and then click Templates And Add-Ins.

graphics/two_icon.jpg

Click the XML Schema tab.

graphics/three_icon.jpg

Click Add Schema.

graphics/four_icon.jpg

Locate and select the XML schema file you want to attach, and then click Open.

graphics/five_icon.jpg

Select or clear a schema to attach or separate it.

graphics/six_icon.jpg

Select the Validate Document Against Attached Schemas check box to validate the document.

graphics/seven_icon.jpg

Click OK.

graphics/15inf07.jpg

Change XML Options

graphics/one_icon.jpg

Click the Tools menu, and then click Templates And Add-Ins.

graphics/two_icon.jpg

Click the XML Schema tab.

graphics/three_icon.jpg

Click XML Options.

graphics/four_icon.jpg

Select or clear the check boxes for the validation options.

graphics/five_icon.jpg

Select or clear the check boxes for the view options.

graphics/six_icon.jpg

Click OK, and then click OK again.

graphics/15inf08.jpg

Open, View, and Modify an XML Data File

graphics/one_icon.jpg

Click the File menu, and then click Open.

graphics/two_icon.jpg

Click the Files Of Type list arrow, and then click XML Files.

graphics/three_icon.jpg

Locate the XML file you want to open.

graphics/four_icon.jpg

Select the XML file.

graphics/five_icon.jpg

Click Open.

graphics/six_icon.jpg

To view the XML, click the View menu, click Task Pane (if necessary), click the Other Task Panes list arrow, and then click XML Structure or XML Document.

graphics/seven_icon.jpg

To show XML tags, select the Show XML Tags In The Document check box.

graphics/eight_icon.jpg

To add an XML tag, select the content you want to tag, and then click an element tag in the XML Structure task pane.

graphics/nine_icon.jpg

As necessary, double-click an XML tag to select its contents, and then use common editing techniques to move, copy, and delete it.

graphics/ten_icon.jpg

When you're done, click the Close button on the task pane.

graphics/15inf09.jpg

graphics/15inf10.jpg

Did You Know?

You can remove an XML tag quickly . Point to the start or end of the tag name , right-click the tag, and then click Remove Tag Name tag.

You can locate XML problems quickly . If the structure of the document violates the rules of the schema, a purple wavy line marks the document location.




Show Me. Microsoft Office Word 2003. See it Done, Do It Yourself
Show Me. Microsoft Office Word 2003. See it Done, Do It Yourself
ISBN: N/A
EAN: N/A
Year: 2002
Pages: 310

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net