Skip to content Skip to sidebar Skip to footer

Parsing Xml Via Saxparser Contain Html Tag

I have parse data from xml that contain html tag. i am not able to get image src attribute can any one show this link. http://mobileecommerce.site247365.com/admin/catdata.xml i giv

Solution 1:

    String str = "Your Cat_Desc tag value";
    String[] temp;

        if (str.contains("<img src=")) {
                                temp = str.split("<img src=");
                                String imagesUrl = temp[1].substring(
                                temp[1].indexOf("\""), temp[1]
                                                .indexOf(" "));
                                imagesUrl = imagesUrl
                                    .replace("\"", " ");
                                System.out.println("My image URL :: " +imagesUrl);
                                }else    {
                              System.out.println("NO imageurl found");           }

Post a Comment for "Parsing Xml Via Saxparser Contain Html Tag"