English 中文(简体)
我如何与两个超文本标签的内容相匹配? 多线插座在它们之间。 - AS3
原标题:How do I match the content of two HTML tags? Multi-line strings inbetween them. - AS3

我想对<内的所有内容进行匹配;div类别=“post_one”id=“pid_”></div>tags... 下面是我需要做的样本。

        <tr>

            <td class="trow2 post_content ">





                <div class="post_body" id="pid_">

                    This is <span style="font-style: italic;">just a test</span> message.<br />
With an image.<br />
[img]http://www.somesite.com/wp-content/something.jpg[/img]<br />
Blah blah <span style="font-weight: bold;">blah</span>.<br />
<br />
The quick brown fox jumps over the lazy <span style="text-decoration: underline;">dawg</span>.<br />
<br />
[video=youtube]http://www.youtube.com/watch?v=MbYZa4gTxzM[/video]<br />
<br />
<a href="mailto:test@test.com">asd</a><br />
<ul>
<li>item number 1</li>
<li>item nubmer 2<br />
</li></ul>
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:<br />
</div><div class="body"><div dir="ltr"><code><span style="color: #66CCFF">&lt;?php&nbsp;</span><span style="color: #7AC07C">echo&nbsp;</span><span style="color: #FF99FF"> hello&nbsp;world </span><span style="color: #7AC07C">;&nbsp;</span><span style="color: #66CCFF">?&gt;</span></code></div></div></div>
<br />
<div style="text-align: center;">i am centered.</div>
<div style="text-align: right;">i am not centered.</div>

                </div>







                <div class="post_meta" id="post_meta_">



                </div>

            </td>

        </tr>

如你所知,我有意地在标签之间增加了一整座脚架。 这是我需要帮助的一部分。 鉴于还有其他方面,我如何探测上述两点的内幕。

在SAP3号“闪电器”上做了这项工作。

问题回答

If your HTML is XHTML, you can use XPath to parse and get the values inside those tags. See this question Parsing XML/XHTML in Actionscript





相关问题
Disable button tooltip in AS3

I want to disable the tooltip on certain buttons. The tooltip manager seems to be an all or nothing solution. Is it possible to disable the tooltip for just one or two buttons?

Multiple Remote call made simultenously

I was making multiple remote calls and they are done sequentially and when I am getting a result event back it s triggering calls to all the methods with ResultEvent as an argument . I am supposed to ...

Attaching a property to an event in Flex/AS3

I have a parameter that needs to be passed along with an event. After unsuccessful attempts to place it on the type by extending the class, I ve been advised in another SO question to write a custom ...

Clearing RSL in Cache

I have built a flex application which has a "main" project and it is assosciated with a few RSL s which are loaded and cached once i run my "main" application. The problem i am facing is that the ...

What s a good way of deserializing data into mock objects?

I m writing a mock backend service for my flex application. Because I will likely need to add/edit/modify the mock data over time, I d prefer not to generate the data in code like this: var mockData =...

AS3 try/catch out of memory

I m loading a few huge images on my flex/as3 app, but I can t manage to catch the error when the flash player runs out of memory. Here is the what I was thinking might work (I use ???? because i dont ...

热门标签