You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Harinee Sampath <ha...@hotmail.com> on 2000/07/06 16:18:23 UTC
Creating new DOM
Hi,
I needed some help with creating a DOM frm scratch.The DOMGenerate example
in xerces/samples does not run and gives some errors.I want to have a clear
idea of the output that the example gives.
I do not understand from the example the exact tree structure(which element
is the child of which element).
Also the setAttribute method,if used right after creating an Element ,does
it automatically belong to the element created,or is another method required
to specify that?If so,which?
Thanks,
Harinee
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
Re: Creating new DOM
Posted by Eric Ye <er...@locus.apache.org>.
I just tested dom.DOMGenerate, it works fine for me . Would you mind sharing
how you ran the sample and the error message you got?
Bascially the program will print out:
<person> <name>Jeff</name><age>28</age><height>1.80</height></person>
in which "person" element has 3 children "name", "age" and "height", all of
which has text content.
As for setAttribute method, if used right after creating a Element, if you
setAttribute on the element object you created, the attribute will certainly
belong to that element.
_____
Eric Ye * IBM, JTC - Silicon Valley * ericye@locus.apache.org
----- Original Message -----
From: "Harinee Sampath" <ha...@hotmail.com>
To: <xe...@xml.apache.org>
Sent: Thursday, July 06, 2000 7:18 AM
Subject: Creating new DOM
> Hi,
>
> I needed some help with creating a DOM frm scratch.The DOMGenerate example
> in xerces/samples does not run and gives some errors.I want to have a
clear
> idea of the output that the example gives.
> I do not understand from the example the exact tree structure(which
element
> is the child of which element).
> Also the setAttribute method,if used right after creating an Element ,does
> it automatically belong to the element created,or is another method
required
> to specify that?If so,which?
>
> Thanks,
> Harinee
> ________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
>
>