<script language="JavaScript" type="text/javascript">
function validateXML()
{
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM")
xmlDoc.async="false"
xmlDoc.loadXML(document.all("validxml").value)
if(xmlDoc.parseError.errorCode!=0)
{
txt="Error Code: " + xmlDoc.parseError.errorCode + "\n"
txt=txt+"Error Reason: " + xmlDoc.parseError.reason
txt=txt+"Error Line: " + xmlDoc.parseError.line
alert(txt)
}
else
{
alert("No errors found")
}
}
</script>
<h2>Validating your XML</h2>
<p>To help you validate your xml, we have used Microsoft's XML parser to create
an xml validator. Paste your xml in the text area, and validate it by pressing the validate button</p>
<form action="">
<textarea id="validxml" rows="10" cols="50">
<?xml version="1.0" ?>
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</HEADING>
<body>Don't forget me this weekend!</body>
</note>
</textarea>
<br />
<input type="button" value="Validate" onclick="validateXML()" />
</form>
<form action="http://www.w3schools.com/dom/validator.asp" target="_blank" method="post">
File Name:
<input type="text" name="xmlfile" size="50" value="http://www.w3schools.com/dom/note_error.xml" />
<input type="submit" />
</form>
'XML' 카테고리의 다른 글
| [5분강좌] 헬로 XQuery (0) | 2007/06/07 |
|---|---|
| 메인 페이지 게시물 성능개선 처리 방법에 (0) | 2007/06/07 |
| Validating your XML (0) | 2007/06/07 |
| 5분 강좌 XML copy, copy-of, apply-templates, valu (0) | 2007/06/07 |
| XML과 XSL을 이용한 UI 디자인 (0) | 2007/06/07 |
| Excel 2003 통합 문서 생성을 위해 Visual Basic 및 ASP에서 XML 사용 (0) | 2007/06/07 |




최근에 달린 댓글
링크
최근에 받은 트랙백
태그목록