Xml
Xml
- Subject: Xml
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Mon, 3 Nov 2008 23:09:30 +0100
I do:
NSXMLDocument *xmlDoc = ...
NSData *data = [ xmlDoc XMLDataWithOptions: NSXMLNodePrettyPrint |
NSXMLNodeCompactEmptyElement ];
This <data> looks like:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE [
<!ELEMENT geometry (vertices)>
<!ATTLIST geometry version CDATA "1.0">
<!ELEMENT vertices (vertex)*>
<!ATTLIST vertex name CDATA "none">
<!ATTLIST vertex x CDATA "nan">
<!ATTLIST vertex y CDATA "nan">
<!ATTLIST vertex z CDATA "nan">
]>
<geometry version="1.3">
<vertices>
<vertex name="0" x="0" y="9" z="0"/>
<vertex name="1" x="0" y="-9" z="0"/>
</vertices>
</geometry>
So far so good(?)
When I do [ xmlDoc validateAndReturnError: &error ] I get "no DTD
found!". Why?
And when I do:
NSXMLParser *parser = [ [ NSXMLParser alloc ] initWithData: data ];
[ parser parse];
I get:
parserDidStartDocument
NSXMLParserErrorDomain 68 = NSXMLParserNAMERequiredError
Obviously I am doing something (or several things) not right. But what?
Kind regards
Gerriet.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
- Follow-Ups:
- Re: Xml
- From: Klaus Backert <email@hidden>