473,382 Members | 1,365 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

How to parse a DTD file in C#.NET (I'm using VS 2005)

Hi,
i have been through many sites for my problem. but nowhere have i found a suitable solution
Can anyone tell me how to parse a DTD file in C#.NET . I'm using VS 2005. I have a DTD file like:

<!ELEMENT user (name,email)>
<!ELEMENT name (forename, surname)>
<!ELEMENT forename (#PCDATA)>
<!ELEMENT surname (#PCDATA)>
<!ELEMENT email (#PCDATA)>

i want to get information like the array of elements, its children and its data type.
Is there a direct method?
If no how do i do it indirectly?
On some sites it is mentioned that it can be done using SAX parser but cant find details abt it.....
Can anyone please help me with this.

Thanks in anticipation......
Swaps.
Oct 5 '07 #1
3 2095
kenobewan
4,871 Expert 4TB
I believe that it is possible to create a dataset using a dtd schema, then bind to your array. HTH.
Oct 5 '07 #2
can you please elaborate on it please. Actually i'm not using any database to associate it with a dataset. My actually problem is i need to read the DTD, collect all elements mentioned in it and generate a form to capture values for all those elements. My client is insistent that he will give me a DTD and nothing else. So reading and parsing the DTD is must.
i tried finding it in MSDN but with no results..... As mentioned in my earlier post i have a DTD and need to read it. Can you take it from this step and elaborate.....
Oct 5 '07 #3
kenobewan
4,871 Expert 4TB
No database required. Create a schema for your dtd file, fill a dataset with that and then bind to array. HTH.
Oct 6 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: laredotornado | last post by:
Hi, I'm using PHP 4 and trying to parse through HTML to look for HREF attributes of anchor tags and SRC attributes of IMG tags. Does anyone know of any libraries/freeware to help parse through...
4
by: Andrew E | last post by:
Hi all I've written a python program that adds orders into our order routing simulation system. It works well, and has a syntax along these lines: ./neworder --instrument NOKIA --size 23...
7
by: serpent17 | last post by:
Hello all, I have this line of numbers: 04242005 18:20:42-0.000002, 271.1748608, , , repeated several times in a text file and I would like each element to be part of a vector. how do...
2
by: Samuel | last post by:
Hello, I am trying to convert a local time into UTC ISO8601, then parse it back into local time. I tried the following: ---------------------- #!/usr/bin/python import time import datetime...
46
by: vvk4 | last post by:
I have an excel spreadsheet that I need to parse. I was thinking of saving this as a CSV file. And then reading the file using C. The actual in EXCEL looks like: a,b a"b a","b a,",b In CSV...
4
by: C | last post by:
Hi, I have a CSV file with some data (7,500 rows , 18 columns) How can I parse this file in C#? Can I programmatically save the file as an Excel Workbook and then parse the file using the...
14
by: Rob Meade | last post by:
Hi all, I'm working on a project where there are just under 1300 course files, these are HTML files - my problem is that I need to do more with the content of these pages - and the thought of...
5
AdrianH
by: AdrianH | last post by:
Assumptions I am assuming that you know or are capable of looking up the functions I am to describe here and have some remedial understanding of C++ programming. FYI Although I have called...
1
AdrianH
by: AdrianH | last post by:
Assumptions I am assuming that you know or are capable of looking up the functions I am to describe here and have some remedial understanding of C programming. FYI Although I have called this...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.