Re: Absent TAGs ...
Ron Bourret (rbourret@dvs1.informatik.tu-darmstadt.de)
Thu, 1 Oct 1998 15:41:27 +0200
> I work with msxml and xml files generated by a database. When a tag value
> is absent, the database don't generate the tag. In that way, when my
> scripts try to treat it ... an error occur. How can I bypass this problem.
> I already try, to attibute the tag to a VAR (in my JScript) and supply and
> IF statement, but with no result.
If the element is not required to be present (can be NULL in your database),
change the DTD so that it's presence is optional. For example, if the foo
element always includes bar but only sometimes includes baz, use the
declaration:
<!ELEMENT foo (bar, baz?)>
-- Ron Bourret