XML Links

Discussion in 'Web Design and Development' started by sbryan, Dec 17, 2009.

  1. sbryan macrumors member

    Joined:
    Jun 6, 2007
    #1
    Is it possible to use an a link in XML fields?

    Example:
    about="a link text and link here"
     
  2. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #2
    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.
     
  3. sbryan thread starter macrumors member

    Joined:
    Jun 6, 2007
    #3
    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
    "/>
     
  4. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #4
    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.
     
  5. sbryan thread starter macrumors member

    Joined:
    Jun 6, 2007
    #5
    A parsing error prevents the Flash component from loading.

    Is there a way to prevent double quotes " " from being parsed?
     
  6. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #6
    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.
     
  7. sbryan thread starter macrumors member

    Joined:
    Jun 6, 2007
    #7
    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.
     
  8. nuxx macrumors member

    nuxx

    Joined:
    Jun 5, 2007
    Location:
    Tokyo
    #8
    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.
     

Share This Page