Results 1 to 2 of 2

Thread: any XML guru's?

  1. #1
    Chief of Naval Operations attgig's Avatar
    Join Date
    Jun 2000
    Location
    the burbs of baltimore
    Posts
    11,965

    any XML guru's?

    need to learn xml for work, making a few documents...
    question...

    what's the diff between making a bunch of attributes for a element or instead of using attributes, just making them all elemenets?

    for example, whats the diff between having something like:

    <!ELEMENT name (first_name, last_name)>
    <!ELEMENT first_name (#PCDATA)>
    <!ELEMENT last_name (#PCDATA)>

    or having something like:
    <!ELEMENT name (#PCDATA)>
    <!ATTLIST name
    first_name CDATA #REQUIRED
    last_name CDATA #REQUIRED >

    ???
    Last edited by attgig; 11-13-2002 at 01:02 PM.

  2. #2
    Lieutenant Commander
    Join Date
    Oct 2001
    Posts
    523
    Attribute values can contain any ASCII characters, including those normally reserved for markup. Because of this, attribute values are not designed to be parsable by an XML processor which means that attribute values cannot be validated. The processor will check to determine that an attribute name and value match the type that was declared in the DTD, but it will not care what the value is.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •