Results 1 to 5 of 5
Thread: Problem with SAX parser
- 08-23-2012, 03:31 PM #1
Member
- Join Date
- Aug 2012
- Posts
- 1
- Rep Power
- 0
Problem with SAX parser
I have a problem with SAX parser.
My code contains the text in this format
<edge label="GENE1 (int) GENE2" source="-1" target="-4199">
<att type="integer" name="protein1" value="12"/>
<att type="integer" name="protein2" value="11"/>
<att type="integer" name="protein3" value="10"/>
Now both the types "edge" and "att" have been called as qualified names. I would like to know how to access the second qName ("att") inside the first qName (edge). Please help!
- 08-23-2012, 04:56 PM #2
Re: Problem with SAX parser
Removed from JPA and Sax parser persistence issue
Don't hijack another poster's thread.
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 08-23-2012, 05:00 PM #3
Re: Problem with SAX parser
Also, don't double post. Your other thread hijack post has been deleted.
Please go through the Forum Rules.
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 08-24-2012, 03:29 PM #4
Member
- Join Date
- Jul 2011
- Posts
- 32
- Rep Power
- 0
Re: Problem with SAX parser
Something like the below !
private boolean edge=false;
public void start element(){
if(qname.equalsIgnorecase("edge"){
edge=true
}
}
public void endElement(){
if(edge){
if(qName.equalsIgnoreCase("edge"){
//put your code here
}
}
edge=false
}
Also one to note that all attributes are only called in the start element and not in the end element
- 08-24-2012, 09:59 PM #5
Re: Problem with SAX parser
Why do they call it rush hour when nothing moves? - Robin Williams
Similar Threads
-
xml parser
By kkGG in forum Advanced JavaReplies: 7Last Post: 01-25-2012, 09:46 AM -
XML Parser SAX problem with diacritical letters
By damiannelus in forum New To JavaReplies: 1Last Post: 12-10-2010, 01:13 PM -
xml parser problem
By raghavendra.cse in forum Advanced JavaReplies: 1Last Post: 05-13-2010, 04:01 PM -
Problem with HTML parser
By kpraveenreddy in forum New To JavaReplies: 0Last Post: 03-02-2010, 02:12 PM -
problem with XERCES Parser using Option FieldType
By oregon in forum New To JavaReplies: 1Last Post: 07-24-2007, 01:44 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks