Hi Han Ming,
by looking at the current sources for DOMWriterImpl, it already writes <foo/> if the element has no children. What version of Xerces are you using?


Alberto

At 21.05 30/03/2004 -0800, Han Ming Ong wrote:
Hi all,

Sorry that I couldn't remember the W3C name for this feature. Essentially, if element foo has an empty content model, I would like DOMWriter to output <foo> instead of <foo></foo>. I know that they are equivalent but I prefer the former syntax...

I don't think any of these flags change that behavior

    // Introduced in DOM Level 3
    // DOMWriter feature
    static const XMLCh fgDOMWRTCanonicalForm[];
    static const XMLCh fgDOMWRTDiscardDefaultContent[];
    static const XMLCh fgDOMWRTEntities[];
    static const XMLCh fgDOMWRTFormatPrettyPrint[];
    static const XMLCh fgDOMWRTNormalizeCharacters[];
    static const XMLCh fgDOMWRTSplitCdataSections[];
    static const XMLCh fgDOMWRTValidation[];
    static const XMLCh fgDOMWRTWhitespaceInElementContent[];
    static const XMLCh fgDOMWRTBOM[];
    static const XMLCh fgDOMXMLDeclaration[];

Any idea please?

Thanks, Han Ming




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to