XML, DTD, .C#Net

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Hiren Mistry
    New Member
    • Jun 2007
    • 17

    XML, DTD, .C#Net

    Hi,
    I need to read in a DTD from a file that is provided by a third
    party. From the DOM created from this DTD I need to create a GUI which
    will allow me to enter information into text boxes to insert into the
    XML. For Example:

    Start with:

    Code:
    (DTD)
    <!ELEMENT cdlib (cd+)>
    
    <!ELEMENT cd (artist+, title+, format?, description?)>
    <!ELEMENT artist (#PCDATA)>
    <!ELEMENT title (#PCDATA)>
    <!ELEMENT format (#PCDATA)>
    <!ELEMENT description (#PCDATA)>
    Next Step is:

    (GUI)
    ------------------------------------------
    ------------------------------------------
    cdlib
    ------------------------------------------
    cd + -
    ------------------------------------------
    _______________ _________
    Artist |AnArtist______ __________| + -
    _______________ _________
    Title |ATitle________ __________| + -
    _______________ _________
    Format |AFormat_______ __________| -
    _______________ _________
    Description |ADescription__ __________| -

    ------------------------------------------
    ------------------------------------------

    Next Step is:

    Code:
    (XML)
    
    <cdlib>
    
       <cd>
       <artist>AnArtist</artist>
       <title>ATitle</title>
       <format>AFormat></format>
       <description>ADescription</description>
       </cd>
    
    </cdlib>
    I need to develop this Application in C#.Net.
    As you see, the idea is to have an application that is fully dynamic. I have
    found some XML parsing components, but they don't seem to allow you to
    parse a DTD to create anything but a DOM Document Type. From here I am
    unsure what the next step should be. I also here that the DTD section
    of the DOM is likely to change greatly in level 3. Is the project just
    a pipe dream :)? Any help would be appreciated.

    Thanks,

    hiren mistry
  • Dököll
    Recognized Expert Top Contributor
    • Nov 2006
    • 2379

    #2
    Code:
    Start with:
    
    (DTD)
    <!ELEMENT cdlib (cd+)>
    
    <!ELEMENT cd (artist+, title+, format?, description?)>
    <!ELEMENT artist (#PCDATA)>
    <!ELEMENT title (#PCDATA)>
    <!ELEMENT format (#PCDATA)>
    <!ELEMENT description (#PCDATA)>
    Next Step is:

    (GUI)
    ------------------------------------------
    ------------------------------------------
    cdlib
    ------------------------------------------
    cd + -
    ------------------------------------------
    _______________ _________
    Artist |AnArtist______ __________| + -
    _______________ _________
    Title |ATitle________ __________| + -
    _______________ _________
    Format |AFormat_______ __________| -
    _______________ _________
    Description |ADescription__ __________| -

    ------------------------------------------
    ------------------------------------------

    Next Step is:

    Code:
    (XML)
    
    <cdlib>
    
       <cd>
       <artist>AnArtist</artist>
       <title>ATitle</title>
       <format>AFormat></format>
       <description>ADescription</description>
       </cd>
    
    </cdlib>
    I need to develop this Application in C#.Net.Thanks,

    hiren mistry[/QUOTE]Follow your dream Hiren!

    I am adding a link then forward to C# forum, I think you should start by communication with the your files then go from there. Your GUI should be your starting pointing:

    Sorry! We can't seem to find the resource you're looking for


    Please write if you need additional information.

    Good luck with project:-)
    Last edited by Dököll; Jun 26 '07, 02:06 AM. Reason: Text delete/code tags

    Comment

    • Hiren Mistry
      New Member
      • Jun 2007
      • 17

      #3
      Originally posted by Dököll
      Code:
      Start with:
      
      (DTD)
      <!ELEMENT cdlib (cd+)>
      
      <!ELEMENT cd (artist+, title+, format?, description?)>
      <!ELEMENT artist (#PCDATA)>
      <!ELEMENT title (#PCDATA)>
      <!ELEMENT format (#PCDATA)>
      <!ELEMENT description (#PCDATA)>
      Next Step is:

      (GUI)
      ------------------------------------------
      ------------------------------------------
      cdlib
      ------------------------------------------
      cd + -
      ------------------------------------------
      _______________ _________
      Artist |AnArtist______ __________| + -
      _______________ _________
      Title |ATitle________ __________| + -
      _______________ _________
      Format |AFormat_______ __________| -
      _______________ _________
      Description |ADescription__ __________| -

      ------------------------------------------
      ------------------------------------------

      Next Step is:

      Code:
      (XML)
      
      <cdlib>
      
         <cd>
         <artist>AnArtist</artist>
         <title>ATitle</title>
         <format>AFormat></format>
         <description>ADescription</description>
         </cd>
      
      </cdlib>
      I need to develop this Application in C#.Net.Thanks,

      hiren mistry
      Follow your dream Hiren!

      I am adding a link then forward to C# forum, I think you should start by communication with the your files then go from there. Your GUI should be your starting pointing:

      Sorry! We can't seem to find the resource you're looking for


      Please write if you need additional information.

      Good luck with project:-)[/QUOTE]

      Dear sir,
      thanks for such good link.....
      But my problem is how to read this dtd in C#.net

      and from that i need to generate xml :(

      if u have solution for such stuff please let me know

      Thanks
      Hiren Mistry

      Comment

      Working...