Link to home
Start Free TrialLog in
Avatar of static86
static86

asked on

parsing xml with java

Hi,
Can anyone show me example of parsing XML with jerichohtml parser?
Now I can print all tags with:
private static String getSth(StreamedSource source) {
            Iterator i = source.iterator();
		while (i.hasNext()){
                    
                    System.out.println(i.next());

                }
		

		return null;
	}

Open in new window

Avatar of Mick Barry
Mick Barry
Flag of Australia image

Avatar of static86
static86

ASKER

thanks,
I've tired displaySegments(source.getAllTags(StartTagType.XML_DECLARATION)); which prints first line but still I don't know how to display what is inside given tag.
Lines:
displaySegments(source.getAllStartTags("TagNameHere")); returns nothing:/
displaySegments(source.getAllTags());  gives me list of tags.
I just need to display value of given tag.
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Are you using this parser because you have server-side tags?
thanks,i used sax parsers instead.