Advertisement
Guest User

Untitled

a guest
Oct 7th, 2015
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.71 KB | None | 0 0
  1. <html>
  2. <body>
  3. <div class="content">
  4. <div class="content_wrapper">
  5. <table border="0" cellspacing="0" cellpadding="0" class="test_class">
  6. <tr>
  7. <td>
  8. <p>
  9. Reading and looking at images or movies is one thing. Experiencing it in 3D the other. If you like to figure out more about what Showcase is, I would really encourage you to
  10. download Showcase Viewer and have a look at the demo files also available on this site. Interact with the models and see how real it looks.
  11. </p>
  12. <p style="text-align: center;">
  13. <img src="/testsource/fckdata/208123/image/showcarswatch.jpg" alt="" />
  14. <img src="/testsource/fckdata/208123/image/engineswatch.jpg" alt="" />
  15. <img src="/th.gen/?:760x0:/userdata/fckdata/208123/image/toasterswatch.jpg" alt="" />
  16. <img src="/testsource/fckdata/208123/image/smartphoneswatch.jpg" alt="" />
  17. </p>
  18. <p>
  19. <br />
  20. Showcase Viewer is actually a full Showcase install, except data processing and creation tools. This means that you can look at any data created with a regular Showcase you
  21. just can´t add any information. But you may join a collaboration session hosed by a Showcase Professional user. Here is where you can get it:<br />
  22. </p>
  23. <p>
  24. <strong>Operating System</strong><br />
  25. • Microsoft® Windows® XP Professional (SP 2 or higher)<br />
  26. • Windows XP Professional x64 Edition (Autodesk® Showcase® software runs as a 32-bit application on 64-bit operating system)<br />
  27. • Microsoft Windows Vista® 32-bit or 64-bit, including Business, Enterprise or Ultimate (SP 1)
  28. </p>
  29. </td>
  30. </tr>
  31. </table>
  32. </div>
  33. </div>
  34. </body>
  35. </html>
  36.  
  37. CleanerProperties props = new CleanerProperties();
  38. props.setOmitDoctypeDeclaration(true);
  39. props.setAllowHtmlInsideAttributes(true);
  40. props.setOmitUnknownTags(true);
  41.  
  42. TagNode tagNode = new HtmlCleaner(props).clean(urlXML, "UTF-8");
  43. Document doc = new DomSerializer(props, true).createDOM(tagNode);
  44.  
  45. String content = XPathAPI.eval(doc, "/html/body//div[@class='content']/div[@class='content_wrapper']").toString();
  46.  
  47. Reading and looking at images or movies is one thing. Experiencing it in 3D the other. If you like to figure out more about what Showcase is, I would really encourage you to
  48. download Showcase Viewer and have a look at the demo files also available on this site. Interact with the models and see how real it looks.
  49.  
  50. Showcase Viewer is actually a full Showcase install, except data processing and creation tools. This means that you can look at any data created with a regular Showcase you
  51. just can´t add any information. But you may join a collaboration session hosed by a Showcase Professional user. Here is where you can get it
  52.  
  53. Operating System
  54. • Microsoft® Windows® XP Professional (SP 2 or higher)<br />
  55. • Windows XP Professional x64 Edition (Autodesk® Showcase® software runs as a 32-bit application on 64-bit operating system)<br />
  56. • Microsoft Windows Vista® 32-bit or 64-bit, including Business, Enterprise or Ultimate (SP 1)
  57.  
  58. XPathFactory factory = XPathFactory.newInstance();
  59. XPath xpathCompiled = factory.newXPath();
  60. XPathExpression expr = xpathCompiled.compile(contentPath);
  61. NodeList nodes = (NodeList) expr.evaluate(doc, XPathConstants.NODESET);
  62.  
  63.  
  64. for (int i = 0; i < nodes.getLength(); i++) {
  65. Node n = (Node)nodes.item(i);
  66. traverseNodes(n);
  67. }
  68.  
  69. public static void traverseNodes( Node n ) {
  70. NodeList children = n.getChildNodes();
  71. if( children != null ) {
  72. for(int i = 0; i > children.getLength(); i++ ) {
  73. Node childNode = children.item( i );
  74. System.out.println( "node name = " + childNode.getNodeName() );
  75. System.out.println( "node value = " + childNode.getNodeValue() );
  76. System.out.println( "node type = " + childNode.getNodeType() );
  77. traverseNodes( childNode );
  78. }
  79. }
  80. }
  81.  
  82. NodeSequence nodes = (NodeSequence)XPathAPI.eval();
  83.  
  84. XPathFactory factory = XPathFactory.newInstance();
  85. XPath xpathCompiled = factory.newXPath();
  86. XPathExpression expr = xpathCompiled.compile(xpath);
  87.  
  88. NodeList nodes = (NodeList) expr.evaluate(doc, XPathConstants.NODESET);
  89.  
  90. StringWriter sw = new StringWriter();
  91. Transformer serializer = TransformerFactory.newInstance().newTransformer();
  92. serializer.transform(new DOMSource(nodes.item(0)), new StreamResult(sw));
  93. String result = sw.toString();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement