1. Message Display page
2. Publish messages and allow uploading images
3. Enter the password to log on and delete the message.
1. File directory
Upfile is the directory for storing uploaded images.
2. Main Interface
(1) homepage: displays the message page
(2) publish a message page
3. XML document format, named data. xml
The meaning of each field is not
XML parsing often fails because the file contains special characters. There are two reasons: first, the content contains an XML predefined entity, and second, the content contains low-level non-printable characters.
1. the content contains the objects pre-defined in XML, such as "
2. If the content contains low-level
Xml file generated by string xml
/**
* Convert the xml of the string to the org. w3c. dom. Document Object.
* @ Param xml
* @ Return
*/
Public static Document getDocument (String xml
();} }//Converting a DataSet to an XML object string public static string CONVERTDAtasettoxml (DataSet xmlds) { memorystream stream = null; xmltextwriter writer = null; try{ stream = new MemoryStream (); // Load from stream to xmltextreader writer = new XmlTextWriter (stream, Encoding.unicode); //writing to the file using the WriteXml method . nbsP;xmlds.writexml (writer); int count = (int) stream. Length
// (Remember that this XML file cannot be saved on the client. You can put it in a hiddenfile)
Function createxmls (){VaR rowsarray = Document. All ('tbllist'). Rows; // obtain all rows in the table.VaR oxml = new activexobject ("Microsoft. xmldom"); // create an XML ObjectOxml = Document. createelement ("data"); // create a "data" element
For (VAR I = 1; I {If
/*** Convert the XML of a string into a Org.w3c.dom.Document object* @param xml* @return*/public static Document getdocument (String xml) {Document document = NULL;try {Documentbuilderfactory dbf = Documentbuilderfactory.newinstance ();Documentbuilder db = Dbf.newdocumentbuilder ();InputStream is = new Bytearrayinputst
xml| Load | data
When developing a system, there is often code to get its description, such as error messages from error numbers.
These error messages can be stored in an XML data file and read through a DataSet object.
Here is the Read function:
public string geterror (int errorid){When you make an error display, you can put the
PackageCom.swift.kaoshi;ImportJava.io.File;Importjava.util.List;ImportJava.util.Scanner;Importorg.dom4j.Document;Importorg.dom4j.DocumentException;Importorg.dom4j.Element;ImportOrg.dom4j.io.SAXReader;Importorg.junit.Test;/**///dom4j sax Traversal Public classdemo_dom4j { Public Static voidMain (string[] args)throwsException {//Saxreader reader = new Saxreader ();//Document document = Reader.read (new File ("Web. x
, Node, NodeList, Element, and text, which are required to access DOM documents. We can use these interfaces to create, traverse, and modify DOM documents.
In Javax.xml.parsers, the Doumentbuilder and documentbuilderfactory combinations provided by jkd1.4 can parse the XML file and convert it into a DOM document.
In
:
public void GetElement (NodeList nodelist) { Node cnode; int I,len; String str; if (nodelist.getlength () = = 0) //The node does not have a child node return ; for (i=0;i 1) System.out.println (" +str+" "+len);} } }
Note: The above code is just an object that shows node type and text type. Their
the select-xml, we must have XmlDocument objects available for querying. Just need to read the XML folder in the existing not working computer. Then we need to read the XML file from the system file and convert it to the XmlDocum
When developing a system, it is common to get its description by code, for example, to get an error message from an error number.
These error messages can be stored in an XML data file and read through a DataSet object.
The following functions are read:
public string geterror (int errorid){When you make an error display, you can put the text description of the er
First of all, we need to load this XML file, JS load XML file, is through the XMLDOM.
The code is as follows
Copy Code
Htm
How to use
The code is as follows
Copy Code
var xmldoc=loadxml (Text.xml)var elements = Xmldoc.getelementsbytagname ("Company")
= "Form1 ";This. Text = "Form1 ";This. ResumeLayout (false );//// Manually register the Load and Closed events//This. Load + = new System. EventHandler (this. form#load );This. Closed + = new System. EventHandler (this. Form1_Closed );
}# Endregion
/** // /// Start the form from this entry/// Static void Main (){Application. Run (new Form1 ());}/** // /// Convert the loaded Office
Word translates to ppt, and you may be able to do it easily, but instead of translating PowerPoint to Word, you know what? I have always used a very stupid method, that is, the words inside a section of the stick out. Less text is good to say, if more words, the workload can be imagined ...
Transformations in PowerPoint 2003
One of the most common ways you might use this is the following: (in Microsoft Office PowerPoint Version 2003)
1. First open
1. Message Display page
2. Post a message and allow uploading of pictures
3. Enter the password to log in and delete the message.
1. File directory
Upfile is the directory where the uploaded images are saved.
2. Main interface
(1) Homepage, display message page
(2) Post Message page
3. XML document format, named Data.xml
The meaning of each field is not much, the value of each element looks a bit
(name, author, price) This is a declaration with multiple child elements, so the tags "name", "Author", "Price" must appear in the order in which they are arranged in the XML file, and each tag must and can only occur once. If you set the element, follow the "! The element book is any〉 so that the elements can contain arbitrarily set elements, the number and order of occurrences are unrestricted, and, unde
recently, a friend of mine suddenly, asked me what method to quickly convert the image file into Word documents, the boss temporarily assigned tasks, urgent, as every day with the document data dealing with us, who has not encountered such a thing, who did not because of the lack of knowledge and eat loss? Fortunately experienced, but also learned a lot of knowledge, I quickly recommended abbyy finereader 1
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.