OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] Array of #PCDATA

[ Lists Home | Date Index | Thread Index ]

Hi Prasanth Rao,
   When i use DTD in the following way given below, the parser is throwing error saying
    Error:  org.xml.sax.SAXParseException: The content of element type "name" must match "(foo)".
    Error:  org.xml.sax.SAXParseException: The content of element type "foo" must match "(bar)*".
 
    I am able to use   <!ELEMENT name (bar)*> . Actually i want to use  <!ELEMENT name (foo)>.
    What is the solution to use this way.
 
   foo.xml
 ---------------
<?xml version="1.0"?>
<!DOCTYPE foo SYSTEM "foo.dtd">
   <foo>
       <bar>Some text</bar>
       <bar>Some more text</bar>
       <name>
          <bar>Some text</bar>
          <bar>Some more text</bar>
      </name>
  </foo>
 
foo.dtd
--------------
<!ELEMENT foo (bar)*>
<!ELEMENT name (foo)>
<!ELEMENT bar (#PCDATA)>
 
Regards
Raja
 




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS