Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

sbryan

macrumors member
Original poster
Jun 6, 2007
96
0
Is it possible to use an a link in XML fields?

Example:
about="a link text and link here"
 
Can you elaborate on what you're up to? The context is not clear so I really don't have a clue as to how to answer your question.
 
Can you elaborate on what you're up to? The context is not clear so I really don't have a clue as to how to answer your question.

I'm editing an XML-file-driven Flash website.

This firm, for instance, has a Commercial Projects section. There's an XML file for it. Each project, within that file, is formatted like this long example:

<item itemEvents='true' contentPath='images/health/oakview.jpg' title="Oakview Medical Building" location="Omaha, Nebraska" detail1="Technology Design Services" detail2=" " detail3=" " detail4=" " about="We were commissioned to provide a complete structural wiring design for seamless integration of three orthopaedic practices with in-house MRI, C-scan and x-ray services.

The system was designed to provide CATV services throughout the facility and full connectivity to the Nebraska Orthopaedic Hospital, allowing the orthopaedic clinics full access to this facility for all procedures performed.

The design was customer-focused to fit the specific needs of the tenants while allowing for a saleable, cost-effective approach to new technologies and day-to-day business needs.

Technology Design Services
-Entrance facilities, primary pathways, secondary pathways and vertical risers for telecommunications distribution
-Power, grounding and space requirements for the telephone/data equipment
-Primary pathways between the main distribution frame room and building exterior entrance location
-Telecommunications closets, including horizontal station cabling and telecommunications system grounding
-Cabling schematics and telecommunications closet plans and details
-Sizing of telecommunication pathways
-Wiring structure with systems vendors as needed
-PBX design
-Request for proposal for owner-procured voice switch equipment package
-TCP/IP master plan
-Business and security needs to incorporate a logical design of LAN/WAN implementation
"/>
 
Are you asking if you can place a hyperlink inside the about attribute? If so, you can try using encoded HTML.

Code:
about="Some text and a <a href='link'>Link text</a>"
Then whatever takes this info out can decode it.
 
Are you asking if you can place a hyperlink inside the about attribute? If so, you can try using encoded HTML.

Code:
about="Some text and a <a href='link'>Link text</a>"
Then whatever takes this info out can decode it.

A parsing error prevents the Flash component from loading.

Is there a way to prevent double quotes " " from being parsed?
 
A parsing error prevents the Flash component from loading.

Is there a way to prevent double quotes " " from being parsed?

Have you tried adding a backslash in front of the quote? There's a HTML entity for a quote too you can try as well " I don't mess with Flash so not sure how it does this kind of thing.
 
Hmmm... backslash before the quotes and the " special character isn't working.

I think a links in straight XML differ from XHTML, even though other properties are similar.
 
about is an attribute of the item element and thus requires it's value to be enclosed in quotes. You could possible change the about attribute to a child element of item and then include the link in the about element which does not require quotes:

Code:
<item itemEvents='true' contentPath='images/health/oakview.jpg' ...........>
<about>
<![CDATA[
Some text and a <a href='link'>link</a>
]]>
</about>
</item>

Using CDATA, you don't have to escape quotes etc. You would of course have to change the structure of the XML file and I don't know if that's feasible or even desirable.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.