Announcement

Collapse
No announcement yet.

Parsen von XHTML-File

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Code:
             String text = "&amp;<a href='/app/message?dpt=ma&ttp=msws&plf=news&pid=0408' style='color: #000000; font-size: 12px; font-family: Arial,Helvetica,sans-serif; border: 0; padding: 0; margin: 0 0 0 10px; text-decoration: underline;' title='Neue Nachrichten'>0</a>";
            int pos = text.indexOf("&");
            do {
                if (!text.substring(pos + 1, pos + 4).equalsIgnoreCase("amp")) {
                    text = text.substring(0, pos + 1) + "amp;" + text.substring(pos + 1);
                }
                pos = text.indexOf("&", pos + 4);
            } while (pos < text.length() && pos != -1);
            System.out.println(text);
    Christian

    Comment


    • #17
      Da kann ich jetzt wohl nur noch sagen:

      Danke schön!

      Bei weiteren fragen weis ich ja nun an wen ich mich zu wenden habe!

      Comment

      Working...
      X