1

I have to re-write a large project that uses classes from the System.Xml-Namespace to use the respective classes from System.Xml.Linq using .NET-3.5.

One the functions use the System.Xml.XmlAttribute.Specified property to find all attributes that are specified in regard to a DTD.

Is there an equivalent to this property in the System.Xml.Linq-Namespace, and, if not, is there a workaround to get the same information from an System.Xml.Linq.XAttribute?

miasbeck
  • 1,046
  • 9
  • 14

1 Answers1

1

There is the GetSchemaInfo extension method, the returned IXmlSchemaInfo object has a IsDefault property which will be true if the value comes from an XSD used for validation.

alf
  • 18,372
  • 10
  • 61
  • 92
Richard
  • 106,783
  • 21
  • 203
  • 265
  • Thanks for the info. Alas I have to deal with DTD, not XSD. The GetSchemaInfo of my XAttribute is null. – miasbeck Nov 07 '11 at 10:21