Examples of XMLTraversal


Examples of org.eclipse.wst.wsi.internal.core.xml.XMLTraversal

      // Traverse document looking for processing instructions.
      // ISSUE: this inner class needs ... revisiting/replacing
      // EG. Do we want to list all processing instructions,
      // or is the first sufficient?
      XMLTraversal traversal = new XMLTraversal()
      {
        public void visit(ProcessingInstruction pi)
        {
          try
          {
            result = AssertionResult.RESULT_FAILED;
            failureDetailMessage =
              "Target: " + pi.getTarget() + ", Data: " + pi.getData();
          }
          catch (Exception e)
          {
            // ADD: How should this exception be handled?
          }

          super.visit(pi);
        }
      };

      traversal.visit(doc);

      if (result == AssertionResult.RESULT_FAILED
        && failureDetailMessage != null)
      {
        failureDetail = this.validator.createFailureDetail(failureDetailMessage, entryContext);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.