This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes Document Fragment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Document Fragment" Watch "Document Fragment" New topic
Author

Document Fragment

Palani kumar
Greenhorn

Joined: Sep 01, 2001
Posts: 12
Hai all
What is Document Fragment ? Can i create a document fragment without a root document object.
Can anyone help me how to use document fragment in java
Thanks
Palanikumar
------------------
In the end everything is Right,If it's not then It's not the End


In the end everything is Right,If it's not then It's not the End
Joe Gilvary
Ranch Hand

Joined: May 11, 2001
Posts: 152
A fragment is a "piece" of an XML file that includes
all of the markup for every construct it includes.
This could be a fragment:
<subtotal units="usd">
44.77
</subtotal>
<tax unit="usd">
2.77
</tax>

This could not be a fragment:
<subtotal units="usd">
44.77
</subtotal>
<tax unit="usd">
2.77
</tax>
</order>
The second example did not include all of the markup
for the order element, so it is not "well balanced"
and is not a good example of a fragment.
There's more documenatation at www.w3.org on
document fragments.
Joe
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Document Fragment
 
Similar Threads
How to parse XML
XML fragment processing
Ajax responseXML problem
Tradeoff between backend and front end
Comment Handling while parsing and building an xml file in xerces