> is there any way to read the content between xml tag
Yes. Are you having some sort of problem? If so, please be a little more explicit about what you're doing, what you expect to happen, and what you actually observe.
Please post a short, concise, executable example of what you're trying to do. Don't post the actual code you are using (I can't emphasize this strongly enough). Just write a small example that demonstrates the problem, and only that. Wrap the code in a class and give it a main method that runs it - if we can just copy and paste the code into a text file, compile it and run it without any changes, then we can be sure that we haven't made incorrect assumptions about how you are using it.
Post your code between [code] and [/code] tags. Cut and paste the code, rather than re-typing it (re-typing often introduces subtle errors that make your problem difficult to troubleshoot). Please preview your post when posting code.
Please assume that we only have the core API. We have no idea what SomeCustomClass is, and neither does our collective compiler.
If you have an error message, post the exact, complete error along with a full stack trace, if possible. Make sure you're not swallowing any Exceptions.
Help us help you solve your problem.
~
</text:sequence-decls>
- <text:p text:style-name="Text_20_body">
<draw:control text:anchor-type="paragraph" draw:z-index="0" draw:style-name="gr1" draw:text-style-name="P1" svg:width="1.8913in" svg:height="0.1689in" svg:x="2.4957in" svg:y="0.0598in" draw:control="control1" />
</text:p>
<text:p text:style-name="Text_20_body">He heard quiet steps behind him. That didn't bode well. Who could oment, just after he pulled off the big time wall, into the dark, away from his enemy. Would this door save his hide?</text:p>
<text:p text:style-name="Text_20_body" />
above is xml file i have read xml file using following code?
DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
Document doc = docBuilder.parse (new File(fileName));
now i want read only content between <text:p text:style-name="Text_20_body"> tag
NodeList list=doc.getElementsByTagName("text:p");
Node n=null;
//System.out.println(list.getLength());
for(int i=0;i<list.getLength();i++)
{
// System.out.println("i am here in for");
n=list.item(i);
// System.out.print(n.getNodeName() + "");
System.out.print(n.getTextContent() + "");
thanx for help>