2012-03-06 2 views
0

저는 XML을 새로 사용합니다. 테이블의 비용 노드에 하이퍼 링크를 추가해야하며 요소 ID는 ExpName입니다. 내가 찾은 가장 좋은 방법은 XLink를 사용하여 XML로 하이퍼 링크를 만드는 것이지만, 여러 번 시도해 보았고 페이지를 작동시킬 수 없었다. 아무도 나를 줍니까? 제대로 작동하는 하이퍼 링크를 얻기 위해 대신 인 XLink의 네임 스페이스로 http://www.studentsofferingsupport.ca/portal/Finance/CashTracker.phpXML에서 XLink를 사용하는 방법

$xml_output = "<?xml version=\"1.0\"?>"; 
$xml_output .= "<list_of_transactions>"; 
$xml_output .="<homepages xmlns:xlink='http://www.w3.org/1999/xlink'>"; 

$sql_select6 = "SELECT Finance_Expenses.ExpID, Finance_Expenses.ExpName, 
    Finance_Expenses.Image, lm_user_profiles.FirstName, 
    lm_user_profiles.LastName, Finance_Expenses.DateSubmit, 
    Finance_Expenses.ChequeNo, Finance_MethodOfPayment.Type 
FROM Finance_Expenses, lm_user_profiles, Finance_MethodOfPayment 
WHERE Finance_Expenses.user_id = lm_user_profiles.user_id 
    AND Finance_MethodOfPayment.PayID = Finance_Expenses.PayID 
    AND Finance_Expenses.School IN('".join("','", $chapter)."') 
    AND Finance_Expenses.ExpID = '$transID'"; 

$result6 = mysql_query($sql_select6) or die(mysql_error()); 

$resultCount6 = mysql_num_rows($result6); 

$row6 = mysql_fetch_array($result6); 
#Store transaction detail 

$transDetail = "EXPENSE paid by " . $row6['Type'] 
    . " " . $row6['Image'] . ""; 

$transDetail .= $row6['ExpName']."(".$row6['DateSubmit'].") \n"; 

$row6 = mysql_fetch_array($result6); 
break; 

#Populate XML document 
$xml_output .= "<Transaction>"; 
$xml_output .= "<Date>" . $dateBank . "</Date>"; 
$xml_output .= "<Detail>" . $transDetail . "</Detail>"; 
$xml_output .= "<DetailType>" . $detailType . "</DetailType>"; 
$xml_output .= "<Amount>" . $amount . "</Amount>"; 
$xml_output .= "<TransType>" . $transType . "</TransType>"; 
$xml_output .= "<DayBalance>" . $dayBalance . "</DayBalance>"; 
//$xml_output .= "<a>" . $chapter[0] . "</a>"; 
$xml_output .= "</Transaction>"; 
+0

안녕하세요 shuai, 당신이 준 링크는 사용자 이름과 비밀 번호를 묻는 studentsofferingsupport 로그인 화면을 보여줍니다. –

답변

0

사용 XHTML :이 페이지는에 위치

<homepages xmlns='http://www.w3.org/1999/xhtml'> 

이 하이퍼 링크 요소의 ID를 추가

"<a href='#ExpName'>" . $chapter[0] . "</a>"; 
관련 문제