Home >Backend Development >XML/RSS Tutorial >XML—detailed explanation of programming to try to add, delete, check, and modify an XML document

XML—detailed explanation of programming to try to add, delete, check, and modify an XML document

黄舟
黄舟Original
2017-03-08 16:14:401654browse

Corresponding program: project: TestDoProject

Corresponding program: javaWeb day01

1. You must learn to program a project into modules: This program is divided into 4 modules: dao, doMain, tool, view

  • dao: This package stores functions that directly operate on files. The main method can call the methods in this package to operate on XML documents;

  • doMain: This package is a constructor package

  • tool: This package is a tool package. Write the tool class you want to use and put it in this The package facilitates program calls without having to type the code every time;

  • view: This package contains interface classes for dealing with users, and the main class is here;

2. Frequently used in this program:

  • document has many ways to easily modify the document;

  • element tag;

  • attribute attribute;

##3. Problems encountered:

  • When deleting the design, an error was reported because the changes were not written into the document at the end;

  • When searching for the design, the exam_id in the video was an attribute and my name is a label, so using attribute prompts a null pointer exception;

  • When designing the search, due to accidentally adding ";" and "{}" after for, a null pointer prompt was misplaced. Abnormal, it took a long time to debug.

4. When solving problems, sometimes first check whether the program syntax or structure is wrong, and solve small problems first.


The above is the detailed content of XML—detailed explanation of programming to try to add, delete, check, and modify an XML document. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn