S
Sherif ElMetainy
Hello
I am developing a WAP application, in which I want to process some xml
documents like the one below.
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE si PUBLIC "-//WAPFORUM//DTD SI 1.0//EN"
"http://www.wapforum.org/DTD/si.dtd">
<si><indication href="http://www.example.com/example.wml"
action="signal-medium" created="2004-03-21T00:00:00Z"
si-expires="2004-04-21T00:00:00Z">
Test Description</indication>
</si>
System.Xml classes can parse the documents without a problem. .NET framework
reads the dtd document in the <!DOCTYPE > declaration and uses it for
validation. But there is I can't access the data in the dtd parsed by the
framework. I am looking for <!ATTLIST > declaration in dtd, like the one
below, because I want to give %Datetime; fields special handling. In VS
debugger I found a SchemaInfo field containing all the information I need,
but it is private and all the classes it its tree are internal. So I must
use reflection to access it, and it will be bad for performance, and
requires full trust. I used regular expressions to parse the DTD file, but I
wonder if there a library to parse DTD file or a better way
<!ATTLIST indication
href %URI; #IMPLIED
si-id CDATA #IMPLIED
created %Datetime; #IMPLIED
si-expires %Datetime; #IMPLIED
action (signal-none|signal-low|signal-medium|signal-high|delete)
"signal-medium"
Best regards,
Sherif
I am developing a WAP application, in which I want to process some xml
documents like the one below.
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE si PUBLIC "-//WAPFORUM//DTD SI 1.0//EN"
"http://www.wapforum.org/DTD/si.dtd">
<si><indication href="http://www.example.com/example.wml"
action="signal-medium" created="2004-03-21T00:00:00Z"
si-expires="2004-04-21T00:00:00Z">
Test Description</indication>
</si>
System.Xml classes can parse the documents without a problem. .NET framework
reads the dtd document in the <!DOCTYPE > declaration and uses it for
validation. But there is I can't access the data in the dtd parsed by the
framework. I am looking for <!ATTLIST > declaration in dtd, like the one
below, because I want to give %Datetime; fields special handling. In VS
debugger I found a SchemaInfo field containing all the information I need,
but it is private and all the classes it its tree are internal. So I must
use reflection to access it, and it will be bad for performance, and
requires full trust. I used regular expressions to parse the DTD file, but I
wonder if there a library to parse DTD file or a better way
<!ATTLIST indication
href %URI; #IMPLIED
si-id CDATA #IMPLIED
created %Datetime; #IMPLIED
si-expires %Datetime; #IMPLIED
action (signal-none|signal-low|signal-medium|signal-high|delete)
"signal-medium"
Best regards,
Sherif