问题描述:

I have written xml file which contains html tags as element like

<component>

<input type="button">

<button id="1">

<class="mytest1">

</component>

now i want to first write a html file with these tags like

<input type="button" class="mytest" id="1">

.and when i change button to text,in xml also it shud be change button to text.

网友答案:

Yes, use the Observer pattern.

Every time your HTML is changed, a method should be called which then processes the XML.

网友答案:

You could create a watch service, as shown here. The service will notify you of any changes and you can take the appropriate action.

相关阅读:
Top