Hi,
> > 1. When using "DOMBuilder" to parse a XML file, all of the newlines are converted > > into text nodes. I've set the "fgDOMWhitespaceInElementContent" feature to > > "false", but this hasn't had any effect. Is there another way to prevent this > > behavior? > > [GR] Since whitespace is significant we cant ignore it. If you create a DTD then you > can set the "ignorable" white space to false. > > [BH] My XML file references an XML schema rather than a DTD. Is the whitespace > feature only applicable when a DTD is referenced? You do need a DTD. > > 2. When using "DOMImplementation" and "DOMWriter" to create and write a document > > to an XML file, there doesn't appear to be a way to specify a validation schema to > > be written into the root element. I've probably missed something in the > > documentation, so a pointer would be greatly appreciated. > > [GR] If I understand you correctly then you mean something like an > xsi:schemaLocation? If this is the case then it is a standard attribute that you > would add the same way as any other. If this is not the case then please do clarify > and I will attempt an answer. > > [BH] Yes, your understanding is correct. I'm not sure I follow your solution > however. The root element is created in the document via the > DOMImplementation::createDocument() method. This method takes a namespaceURI, > qualifiedName, and a docType as parameters. From what I can tell, the docType > parameter is used to specify a DTD rather than a XML schema. Is there some example > code available that specifies a XML schema? On the document node you get you can do a setAttributeNS("http://....", "xsi:schemaLocation"). Gareth -- Gareth Reakes, Head of Product Development +44-1865-203192 DecisionSoft Limited http://www.decisionsoft.com XML Development and Services --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]