2012-04-08 2 views
2

で複数の要素を組み合わせる:これは私が結合しようとしているHTMLで簡単なHTML DOM

<div class="post linkDetail"> 
    <div class="postThumbnail"> 
    <a href="/redirect?url=http%3A//blogs.msdn.com/archive/2012/04/23/how-to-improve-performance-in-your-metro-style-app.aspx"> 
     <img src="<validURL Here>" width="280"> 
    </a> 
    </div> 
    <p class="full-url"> 
    http://blogs.msdn.com/b/windowsappdev/archive/2012/04/03/how-to-improve-performa... 
    </p> 
    <p></p> 
    <p>Nobody likes slow or unresponsive apps. Users expect that apps respond immediately to touch, taps, clicks, gestures and key-presses. Users expect that animations are smooth, that they can play, pause and restart their music and videos quickly, and that they never have to wait for the app to catch up with them. This is the first in a series of posts on how to make your apps "fast and fluid."  
    </p> 
    <p>We invested a lot of time in the engineering teams thinking about how we can ensure the performance of Metro style apps. We have learned what we can do in the platform to deliver on fast and fluid performance and have also learned what works and what does not work in building apps that deliver great experiences. In this blog I share with you some of the hard lessons from our own experiences so that you can build the best possible experiences for your customers.</p><p>Performance is more than just a stopwatch and efficient algorithms. When I think of performance, I like to take a holistic ... 
    </p> 
</div> 

私はp.full-url要素の後<p>コンテンツの全てを取得し、単一へ<p>すべての要素を組み合わせたいですテキスト文字列。

このようにするには:

<p></p> 
    <p>Nobody likes slow or unresponsive apps. Users expect that apps respond immediately to touch, taps, clicks, gestures and key-presses. Users expect that animations are smooth, that they can play, pause and restart their music and videos quickly, and that they never have to wait for the app to catch up with them. This is the first in a series of posts on how to make your apps "fast and fluid."  
    </p> 
    <p>We invested a lot of time in the engineering teams thinking about how we can ensure the performance of Metro style apps. We have learned what we can do in the platform to deliver on fast and fluid performance and have also learned what works and what does not work in building apps that deliver great experiences. In this blog I share with you some of the hard lessons from our own experiences so that you can build the best possible experiences for your customers.</p><p>Performance is more than just a stopwatch and efficient algorithms. When I think of performance, I like to take a holistic ... 
    </p> 

は次のようになります。

誰もが遅いまたは応答しないアプリケーションを好きではありません。ユーザーがアプリは、タップ、クリック、ジェスチャーやキー押下を触れないように即座に対応することを期待しています。ユーザーは、遊ぶ一時停止し、すぐに彼らの音楽やビデオを再起動して、彼らは彼らに追いつくためにアプリを待つ必要がないことができることを、アニメーションが滑らかであることを期待しています。これは、あなたのアプリを「速くて流動的に」するための一連の記事の中で最初のものです。私たちは、Metroスタイルアプリのパフォーマンスを確保することができる方法を考えるエンジニアリング・チームに多くの時間を投資しました。我々は、高速かつ流体パフォーマンスに提供するためのプラットフォームで何ができるかを学びましたし、またどのような動作し、どのような素晴らしい体験を提供建物のアプリでは動作しませんことを学びました。あなたの顧客のために可能な限り最高のエクスペリエンスを構築できるように、このブログでは、私はあなたと私たち自身の経験からハード教訓のいくつかを共有しています。パフォーマンスは単なるストップウォッチと効率的なアルゴリズム以上のものです。私は、パフォーマンスについて考えるとき、私はシンプルなHTMLのDOMに、このことは可能ですホリスティックな...

を取るのが好き?

答えて

0

私は、単純なHTMLのDOMを使ったことがないが、私は、これは何が必要だと思う:

$result = ''; 
foreach($html->find('p') as $p) { 
    $result .= strip_tags($p->plaintext); 
} 
関連する問題