[vtkusers] XML Parsing

norberto at ctm.ulpgc.es norberto at ctm.ulpgc.es
Tue Mar 29 09:43:10 EST 2005


I'm trying to load a xml file with vtkXMLParse class to extract the data
wich contain it, but the class show errors like the follows:
ERROR: In /export/home/glehmann/rpm/BUILD/VTK/IO/vtkXMLParser.cxx, line 423
vtkXMLParser (0x811d038): Unknown element in XML stream: address-book

The xml file is this:

<?xml version="1.0"?>
<!DOCTYPE address-book [
<!ELEMENT 	address-book 	(entry+)>
<!ELEMENT 	entry        	(name,address*,tel*,fax*,email*,comments?)>
<!ELEMENT	name        	(#PCDATA)>
<!ELEMENT	address    	(street,region?,postal-code,locality,country)>
<!ATTLIST 	address      	preferred (true | false)  "false">
<!ELEMENT 	street       	(#PCDATA)>
<!ELEMENT	region       	(#PCDATA)>
<!ELEMENT	postal-code 	(#PCDATA)>
<!ELEMENT	locality    	(#PCDATA)>
<!ELEMENT 	country      	(#PCDATA)>
<!ELEMENT 	tel          	(#PCDATA)>
<!ATTLIST	tel         	preferred (true | false)  "false">
<!ELEMENT 	fax          	(#PCDATA)>
<!ATTLIST	fax          	preferred (true | false)  "false">
<!ELEMENT 	email        	EMPTY>
<!ATTLIST	email        	href  CDATA    #REQUIRED
                       		preferred (true | false)  "false">
<!ELEMENT 	comments   	(#PCDATA | b)*>
<!ELEMENT 	b            	(#PCDATA)>
]>
<address-book>
   <entry>
      <name>Donald Duck</name>
      <address>
         <street>Disneyland</street>
         <region>West</region>
         <postal-code>99999</postal-code>
         <locality>Anaheim</locality>
         <country>US</country>
      </address>
      <tel preferred="true">555-555-555</tel>
      <tel>555-555-5556</tel>
      <email href="mailto:DDuck at disneyland.com"/>
   </entry>
   <entry>
      <name>Minnie Mouse</name>
      <tel>555-555-5557</tel>
      <email href="mailto:Minnie at disneyland.com"/>
      <comments>Be sure you leave a happy message!
      <b>Minnie doesn't mess around.</b></comments>
   </entry>
</address-book>
<!-- based on Marchal, XML by Example -->

Pleeeease Help Me!!!! Thanks





More information about the vtkusers mailing list