|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
HI
iam using sun parser to create a xml dom if iam using element method iam getting in the following format <sravan sravan1='1000'/> but i need the xml structure like this <root> <sravan sravan1='1000'/> </root> any sample code will help me thanx in advance |
|
#2
|
|||
|
|||
|
Well, I'm not exactly sure if this is what you mean, but here goes. I think you would want to call the appendChild(Node newNode) method on your root element. EG - (pseudocode)
Node root; Node firstChild; root.appendChild(firstChild); This should add a child node to the root element. If that's not what you were looking for, post some more details and I'll try to help you out some more.
__________________
- MW |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Java Help > how to create a xmldomin javabeans using parser9JAXP |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|