org.teldap.core.xmlvalidator.util.wellform
Class ElementStructure

java.lang.Object
  extended by org.teldap.core.xmlvalidator.util.wellform.ElementStructure

public class ElementStructure
extends java.lang.Object

Copyright 2009 數位典藏與數位學習國家型科技計畫(TELDAP) 數位核心平台計畫

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Title: XML文件需符合良好格式2

Version:
1.0
Author:
徐慈妍、洪崇熙、洪國翔

Constructor Summary
ElementStructure(java.io.File xml)
           
 
Method Summary
 java.util.HashMap collectMsg()
           
 java.util.ArrayList getTag(java.io.File xml)
          取得XML內所有的標籤
 boolean hasRootElement()
          XML文件是否有根節點,以DACatalog XML為例,其根節點為<DACatalog>。
 boolean isTagMatcher()
          每個起始標籤必須對一個結束標籤,且標籤結構須為巢狀,不可交錯穿插
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ElementStructure

public ElementStructure(java.io.File xml)
Method Detail

getTag

public java.util.ArrayList getTag(java.io.File xml)
取得XML內所有的標籤

Parameters:
File - XML檔案

hasRootElement

public boolean hasRootElement()
XML文件是否有根節點,以DACatalog XML為例,其根節點為<DACatalog>。

Returns:
boolean true-有根節點

isTagMatcher

public boolean isTagMatcher()
每個起始標籤必須對一個結束標籤,且標籤結構須為巢狀,不可交錯穿插

Returns:
boolean true-標籤皆有成對出現,未交錯穿插

collectMsg

public java.util.HashMap collectMsg()