Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XML newbie

Status
Not open for further replies.

integrativeD

IS-IT--Management
Nov 29, 2006
1
US
Hello,

Please be nice as I'm very new to xml. Can someone help me with this?
<contact>
<page number="1" title="Contact Us" pageContent="%3Cp%20class%3D%22intro%22%3E%3Cintro%3EFor%20more%
20information%20or%20advice%20you%20can%20contact%20your%20VTM%2C%
20call%20the%20Hill%27s%20Helpline%20or%20visit%20our%20website%2E%3C%
2Fintro%3E%3C%2Fp%3E%3Cbr%3E%3Cp%3EHill%27s%20Pet%20Nutrition%20Ltd%2E%
3C%2Fp%3E%3Cbr%3E%3Cp%3EHelpline%3A%3Cbr%3E0800%20282438%3Cbr%3E1%
2D800%2D626002%20%28ROI%29%3C%2Fp%3E%3Cbr%3E%3Cp%3E%3Ca%20href%3D%
22http%3A%2F%2F3E%3Cimg%20src%3D%22img%2Fweblog%5Fuk%2Ejpg%22%3E%3C%2Fa%3E%3C%2Fp%3E"/>
</contact>

A client of mine decomplied a swf file to fla and the xml got totally messed up. Is there a way to extract all the goop?

This is what it is supposed to look like:

For more information or advice you can contact your VTM, call the Hill’s Help line or visit our website.

Hill’s Pet Nutrition Ltd.

Helpline:


With the image here.

Please help if anyone can.

Thanks!
 
The pageContent attribute retains a fragment of certain page content in html. That content in "unescaped" form reads like this.
[tt]
<p class="intro"><intro>For more information or advice you can contact your VTM, call the Hill's Helpline or visit our website.</intro></p><br><p>Hill's Pet Nutrition Ltd.</p><br><p>Helpline:<br>0800 282438<br>1-800-626002 (ROI)</p><br><p><a href=" target="_blank"><img src="img/weblog_uk.jpg"></a></p>
[/tt]
That's the meaning of it. It looks like the application is using this attribute to convey a html fragment for rendering use at the client. (It may not be a mess-up, or it may.)

When people use pageContent's value, they have to [1] unescape() (such as a javascript function) it and [2] insert it as into a html page at the appropriate place using dom method such as object.insertAdjacentHTML method where the "object" is the html page element, such as body element.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top