Elliot,

    You may do the verification once the fix is in the nightly build.

Rgds,
PeiYong

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, April 01, 2003 6:06 PM
Subject: DOMWriter->writeNode with DocumentFragment


> When I try to "get XML" on a DOMDocumentFragment the
DOMWriter->writeNode()
> returns:
>
> Unrecognized Node Type
>
> Should I be able to get the content of a document fragment?  Once I append
> the docfrag to a document the writeNode will show it in the contents.  But
> when I try to peform this action on a DOMDocumentFragment it does not
work?
> Am I missing something?  I thought a DOMWriter was supposed to be able to
> handle a docfrag.
>
>                   // get the DOM representation
>                   DOMNode                             *doc =
> parser->getDocument();
>                   DOMNode                 *docel=((DOMDocument*)doc)
> ->getDocumentElement();
>                   DOMNode                 *docelchild=docel->getFirstChild
> ();
>                   DOMNode
*docelchild2=docel->getFirstChild
> ()->getNextSibling();
>                   DOMNode
> *docelchildofchild=docelchild->getFirstChild();
>                   DOMDocumentType         *docdoctype=((DOMDocument*)doc)
> ->getDoctype();
>                   DOMDocumentFragment     *docdocfrag=((DOMDocument*)doc)
> ->createDocumentFragment();
>                   XMLCh
*docfragname=XMLString::transcode
> ("newdocfrag");
>                   DOMNode
*docfragchild=((DOMDocument*)doc)
> ->createElement(docfragname);
>                   XMLCh
*docfragtext=XMLString::transcode
> ("newdocfragtext");
>                   DOMText                 *docfragchildtext
> =((DOMDocument*)doc)->createTextNode(docfragtext);
>                   docfragchild->appendChild(docfragchildtext);
>                   docdocfrag->appendChild(docfragchild);
>                   cout<<"DocumentFragment XML: "<<endl;
>                   theSerializer->writeNode(myFormTarget, *docdocfrag);
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


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

Reply via email to