本文整理汇总了Java中com.trollworks.toolkit.io.xml.XMLReader.withinMarker方法的典型用法代码示例。如果您正苦于以下问题:Java XMLReader.withinMarker方法的具体用法?Java XMLReader.withinMarker怎么用?Java XMLReader.withinMarker使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.trollworks.toolkit.io.xml.XMLReader
的用法示例。
在下文中一共展示了XMLReader.withinMarker方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: loadList
import com.trollworks.toolkit.io.xml.XMLReader; //导入方法依赖的package包/类
@Override
protected void loadList(XMLReader reader, LoadState state) throws IOException {
OutlineModel model = getModel();
String marker = reader.getMarker();
do {
if (reader.next() == XMLNodeType.START_TAG) {
String name = reader.getName();
if (Advantage.TAG_ADVANTAGE.equals(name) || Advantage.TAG_ADVANTAGE_CONTAINER.equals(name)) {
model.addRow(new Advantage(this, reader, state), true);
} else {
reader.skipTag(name);
}
}
} while (reader.withinMarker(marker));
}
示例2: loadSelf
import com.trollworks.toolkit.io.xml.XMLReader; //导入方法依赖的package包/类
@Override
protected void loadSelf(XMLReader reader, LoadState state) throws IOException {
setup();
String name = reader.getName();
if (TAG_ROOT.equals(name)) {
String marker = reader.getMarker();
do {
if (reader.next() == XMLNodeType.START_TAG) {
name = reader.getName();
if (AdvantageList.TAG_ROOT.equals(name)) {
mAdvantages.load(reader, state);
} else if (SkillList.TAG_ROOT.equals(name)) {
mSkills.load(reader, state);
} else if (SpellList.TAG_ROOT.equals(name)) {
mSpells.load(reader, state);
} else if (EquipmentList.TAG_ROOT.equals(name)) {
mEquipment.load(reader, state);
} else {
reader.skipTag(name);
}
}
} while (reader.withinMarker(marker));
}
}
示例3: load
import com.trollworks.toolkit.io.xml.XMLReader; //导入方法依赖的package包/类
/** @param reader The XML reader to use. */
protected final void load(XMLReader reader) throws IOException {
String marker = reader.getMarker();
do {
if (reader.next() == XMLNodeType.START_TAG) {
loadSelf(reader);
}
} while (reader.withinMarker(marker));
}
示例4: loadAdvantageList
import com.trollworks.toolkit.io.xml.XMLReader; //导入方法依赖的package包/类
private void loadAdvantageList(XMLReader reader, LoadState state) throws IOException {
String marker = reader.getMarker();
do {
if (reader.next() == XMLNodeType.START_TAG) {
String name = reader.getName();
if (Advantage.TAG_ADVANTAGE.equals(name) || Advantage.TAG_ADVANTAGE_CONTAINER.equals(name)) {
mAdvantages.addRow(new Advantage(this, reader, state), true);
} else {
reader.skipTag(name);
}
}
} while (reader.withinMarker(marker));
}
示例5: loadNotesList
import com.trollworks.toolkit.io.xml.XMLReader; //导入方法依赖的package包/类
private void loadNotesList(XMLReader reader, LoadState state) throws IOException {
String marker = reader.getMarker();
do {
if (reader.next() == XMLNodeType.START_TAG) {
String name = reader.getName();
if (Note.TAG_NOTE.equals(name) || Note.TAG_NOTE_CONTAINER.equals(name)) {
mNotes.addRow(new Note(this, reader, state), true);
} else {
reader.skipTag(name);
}
}
} while (reader.withinMarker(marker));
}
示例6: loadList
import com.trollworks.toolkit.io.xml.XMLReader; //导入方法依赖的package包/类
@Override
protected void loadList(XMLReader reader, LoadState state) throws IOException {
OutlineModel model = getModel();
String marker = reader.getMarker();
do {
if (reader.next() == XMLNodeType.START_TAG) {
String name = reader.getName();
if (Equipment.TAG_EQUIPMENT.equals(name) || Equipment.TAG_EQUIPMENT_CONTAINER.equals(name)) {
model.addRow(new Equipment(this, reader, state), true);
} else {
reader.skipTag(name);
}
}
} while (reader.withinMarker(marker));
}
示例7: WeaponStats
import com.trollworks.toolkit.io.xml.XMLReader; //导入方法依赖的package包/类
/**
* Creates a weapon.
*
* @param owner The owning piece of equipment or advantage.
* @param reader The reader to load from.
*/
public WeaponStats(ListRow owner, XMLReader reader) throws IOException {
this(owner);
String marker = reader.getMarker();
do {
if (reader.next() == XMLNodeType.START_TAG) {
loadSelf(reader);
}
} while (reader.withinMarker(marker));
}
示例8: SkillDefault
import com.trollworks.toolkit.io.xml.XMLReader; //导入方法依赖的package包/类
/**
* Creates a skill default.
*
* @param reader The XML reader to use.
*/
public SkillDefault(XMLReader reader) throws IOException {
String marker = reader.getMarker();
mType = SkillDefaultType.Skill;
mName = EMPTY;
mSpecialization = EMPTY;
mModifier = 0;
do {
if (reader.next() == XMLNodeType.START_TAG) {
String name = reader.getName();
if (TAG_TYPE.equals(name)) {
setType(SkillDefaultType.getByName(reader.readText()));
} else if (TAG_NAME.equals(name)) {
setName(reader.readText());
} else if (TAG_SPECIALIZATION.equals(name)) {
setSpecialization(reader.readText());
} else if (TAG_MODIFIER.equals(name)) {
setModifier(reader.readInteger(0));
} else {
reader.skipTag(name);
}
}
} while (reader.withinMarker(marker));
}
示例9: load
import com.trollworks.toolkit.io.xml.XMLReader; //导入方法依赖的package包/类
void load(XMLReader reader) throws IOException {
String marker = reader.getMarker();
do {
if (reader.next() == XMLNodeType.START_TAG) {
String tag = reader.getName();
if (!loadTag(reader, tag)) {
reader.skipTag(tag);
}
}
} while (reader.withinMarker(marker));
}
示例10: loadSkillList
import com.trollworks.toolkit.io.xml.XMLReader; //导入方法依赖的package包/类
private void loadSkillList(XMLReader reader, LoadState state) throws IOException {
String marker = reader.getMarker();
do {
if (reader.next() == XMLNodeType.START_TAG) {
String name = reader.getName();
if (Skill.TAG_SKILL.equals(name) || Skill.TAG_SKILL_CONTAINER.equals(name)) {
mSkills.addRow(new Skill(this, reader, state), true);
} else if (Technique.TAG_TECHNIQUE.equals(name)) {
mSkills.addRow(new Technique(this, reader, state), true);
} else {
reader.skipTag(name);
}
}
} while (reader.withinMarker(marker));
}
示例11: loadSpellList
import com.trollworks.toolkit.io.xml.XMLReader; //导入方法依赖的package包/类
private void loadSpellList(XMLReader reader, LoadState state) throws IOException {
String marker = reader.getMarker();
do {
if (reader.next() == XMLNodeType.START_TAG) {
String name = reader.getName();
if (Spell.TAG_SPELL.equals(name) || Spell.TAG_SPELL_CONTAINER.equals(name)) {
mSpells.addRow(new Spell(this, reader, state), true);
} else {
reader.skipTag(name);
}
}
} while (reader.withinMarker(marker));
}
示例12: loadList
import com.trollworks.toolkit.io.xml.XMLReader; //导入方法依赖的package包/类
@Override
protected void loadList(XMLReader reader, LoadState state) throws IOException {
OutlineModel model = getModel();
String marker = reader.getMarker();
do {
if (reader.next() == XMLNodeType.START_TAG) {
String name = reader.getName();
if (Note.TAG_NOTE.equals(name) || Note.TAG_NOTE_CONTAINER.equals(name)) {
model.addRow(new Note(this, reader, state), true);
} else {
reader.skipTag(name);
}
}
} while (reader.withinMarker(marker));
}
示例13: loadNoteList
import com.trollworks.toolkit.io.xml.XMLReader; //导入方法依赖的package包/类
private void loadNoteList(XMLReader reader, LoadState state) throws IOException {
String marker = reader.getMarker();
do {
if (reader.next() == XMLNodeType.START_TAG) {
String name = reader.getName();
if (Note.TAG_NOTE.equals(name) || Note.TAG_NOTE_CONTAINER.equals(name)) {
mNotes.addRow(new Note(this, reader, state), true);
} else {
reader.skipTag(name);
}
}
} while (reader.withinMarker(marker));
}
示例14: SpellPrereq
import com.trollworks.toolkit.io.xml.XMLReader; //导入方法依赖的package包/类
/**
* Loads a prerequisite.
*
* @param parent The owning prerequisite list, if any.
* @param reader The XML reader to load from.
*/
public SpellPrereq(PrereqList parent, XMLReader reader) throws IOException {
this(parent);
String marker = reader.getMarker();
loadHasAttribute(reader);
do {
if (reader.next() == XMLNodeType.START_TAG) {
String name = reader.getName();
if (TAG_NAME.equals(name)) {
setType(TAG_NAME);
mStringCriteria.load(reader);
} else if (TAG_ANY.equals(name)) {
setType(TAG_ANY);
mQuantityCriteria.load(reader);
} else if (TAG_COLLEGE.equals(name)) {
setType(TAG_COLLEGE);
mStringCriteria.load(reader);
} else if (TAG_COLLEGE_COUNT.equals(name)) {
setType(TAG_COLLEGE_COUNT);
mQuantityCriteria.load(reader);
} else if (TAG_QUANTITY.equals(name)) {
mQuantityCriteria.load(reader);
} else {
reader.skipTag(name);
}
}
} while (reader.withinMarker(marker));
}
示例15: NameLevelPrereq
import com.trollworks.toolkit.io.xml.XMLReader; //导入方法依赖的package包/类
/**
* Loads a prerequisite.
*
* @param parent The owning prerequisite list, if any.
* @param reader The XML reader to load from.
*/
public NameLevelPrereq(PrereqList parent, XMLReader reader) throws IOException {
this(reader.getName(), parent);
initializeForLoad();
String marker = reader.getMarker();
loadHasAttribute(reader);
do {
if (reader.next() == XMLNodeType.START_TAG) {
loadSelf(reader);
}
} while (reader.withinMarker(marker));
}