1 / 22

MSXML 2.0 DLL

MSXML 2.0 DLL. DOM 1.0 Element: getElementsByTagName, getAttribute, getAttributeNode NamedNodeMap: getNamedItem, SetNamedItem, removeNamedItem, item, length parseError Object Node: AddElement, Addattribute,appendchild InsertElementBefore, ReplaceChild, removeChild, createAttribute

apu
Download Presentation

MSXML 2.0 DLL

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. MSXML 2.0 DLL • DOM 1.0 • Element: getElementsByTagName, getAttribute, getAttributeNode • NamedNodeMap: getNamedItem, SetNamedItem, removeNamedItem, item, length • parseError Object • Node: AddElement, Addattribute,appendchild InsertElementBefore, ReplaceChild, removeChild, createAttribute • SelectNodes, SelectSingleNode, Nodefromid

  2. MSXML 2.0 DLL • XSLT: TransformNode, TransformNodetoObject • xmlhttpRequest: Get, Post XML file

  3. MSXML 3.0 DLL • MSXML 3.0 Supports Xpath 1.0, XSLT 1.0, XDR, and SAX2 • XSLT: XSLTemplate30 to create cached Stylesheet to increase the performance, CreateCachedStylesheet, input, output, addparameter, addObject • http://msdn.microsoft.com/library/periodic/period00/xml0900.htm

  4. MSXML 3.0 DLL-XSLT <xsl:transform version=“1.0” xmlns:xsl=http://www.w3.org/1999/xsl/transform xmlns:mylib=“urn:mylib”> <xsl:template match=“/”> Message: <Xsl:value-of select=“mylib:GetMessage()”/> Time: <xsl:value-of selec=“mylib:get-time()”/> </xsl:template> <xsl:transform> Set obj = createObject(“mylib.myobject”) Processor.addobject obj, “urn:mylib” Processor.Transform

  5. MSXML 3.0 DLL-XPath • Doc.setProperty "SelectionLanguage", "XPath“, ixmlDomSelection • Dim sel as ixmlxmldomselection sel=doc.selectnodes(“child::bar/*”) sel.clone,matches,context,expr,getproperty,peeknode, removeAll, removeNext

  6. MSXML 3.0 DLL-SAX • SAX(simple API for XML):startDocument, startElement, characters, endElement, endDocument

  7. MSXML 3.0 DLL-XDR • XDR: XML-Data Reduced Dim cache as IXMLDOMschemaCollection Set Cache = new XMLschemaCache30 Cache.add “urn:bar”, xdrdom Doc1.schemas = cache Doc1.load “foo.xml” Doc1.vallidate

  8. MICROSOFT ACTIVEX DATA OBJECTS 2.5 LIBRARY • Recordset.open • Recordset.save Response, adPersistXML • Recordset.save “xxx.xml”, adPersistXML • Recordset.save ST, adPersistXML • Recordset.open ST

  9. MICROSOFT ACTIVEX DATA OBJECTS 2.5 LIBRARY • ADODB.STREAM Public Function GetEmployees() dim ostrm dim rs dim objGetEmployees set objGetEmployees = Server.CreateObject( “HRApp.CempMgr”) set rs = objGetEmployees.getEmployees() Set oStrm=server.createObject( “ADODB.Stream”) Ostrm.open Rs.save ostrm,1 Ostrm.position=0 GetEmployees=oStrm.ReadText GetEmployees=oStrem.ReadText Set oStrm=nothing Set rs=nothing Set objGetEmployees=NOTHING End Function

  10. MICROSOFT ACTIVEX DATA OBJECTS 2.5 LIBRARY Private Function XML2RS(sXML as string) as adodb.recordset Dim oStrm as ADODB.Stream Set oStrm = new Stream Set XML2RS = new ADODB.Recordset oStrm.open oStrm.WriteText sXML oStrm.Position = 0 XML2RS.Open oStrm Set oStrm = nothing End Function

  11. SOAP TOOLKIT WIZARD • ASP:Create an ASP file and an SDL file in XML format. ASP+SDL+Listener in the same Web folder • ISAPI: Create an ASP file and an Sod file. (<? Xml version=“1.0” ?> • <SOD progID=“progamID.ClassID” schemaLoc=“f:\Web\Class.xml”/> )

  12. <serviceDescription name='SoapDest' xmlns='urn:schemas-xmlsoap-org:sdl.2000-01-25' xmlns:dt='http://www.w3.org/1999/XMLSchema' xmlns:CStringTest='CStringTest' > <import namespace='CStringTest' location='#CStringTest'/> <soap xmlns='urn:schemas-xmlsoap-org:soap-sdl-2000-01-25'> <interface name='CStringTest'> <requestResponse name='StringReverse'> <request ref='CStringTest:StringReverse'/> <response ref='CStringTest:StringReverseResponse'/> <parameterorder>sText</parameterorder> </requestResponse> </interface> <service> <addresses> <address uri='http://localhost/CStringTest.asp'/> </addresses> <implements name='CStringTest'/> </service> </soap>

  13. <CStringTest:schema id='CStringTest' targetNamespace='CStringTest' xmlns='http://www.w3.org/1999/XMLSchema'> <element name='StringReverse'> <type> <element name='sText' type='dt:string'/> </type> </element> <element name='StringReverseResponse'> <type> <element name='return' type='dt:string'/> <element name='sText' type='dt:string'/> </type> </element> </CStringTest:schema>

  14. <%@ Language=VBScript%> <% Option Explicit Response.Expires = 0 Const SOAP_SDLURI = "http://localhost/CStringTest.xml" 'URI of service description file Const MSDNSOAP_SDL = "MSDNSOAP_CStringTest" 'Application Variable name for caching SDL %> <!--#include file="listener.asp"--> <%Public Function StringReverse (ByRef sText) Dim objStringReverse Set objStringReverse = Server.CreateObject("SoapDest.CStringTest") StringReverse = objStringReverse.StringReverse(sText) 'Insert additional code here Set objStringReverse = NOTHING End Function%>

  15. SOAP TOOLKIT :ASP • Soap RequestListener.asp Load class.xml (sdl)  call class.asp  call sub method in class.asp actual methodlistener.asp use response.write sends the result back

  16. SOAP TOOLKIT: ISAPI

  17. ROPE(Remote Object Proxy Engine) 1.0 TYPE LIBRARY : proxy • Proxy: Wrapper class for use by client Set objProxy = New ROPE.Proxy objProxy.LoadServicesDescription(icURI, "http://192.168.1.1/Inventory.xml") objProxy.getTitlePrice(“Rocking Chair”)

  18. ROPE 1.0 TYPE LIBRARY : SOAPPackager • SOAPPackager: Creates SOAP messages. Serializes and deserializes parameters .LoadServicesDescription getmethodname,getParameter Public Function GetEmployeesXML() dim objgetEmployeesXML set objgetEmployeesXML= Server.CreateObject( _ “HRApp.CEmpMgr”) GetEmployeesXML= objGetEmployeesXML.GetEmployeesXML() Dim oPkgr Set oPkgr=Server.CreateObject(“ROPE.SOAPPackager”) GetEmployeesXML= oPkgr.Cdataize(GetEmployeesXML) set oPkgr=nothing set objGetEmployeesXML= Nothing End function

  19. WireTransfer: POSTS HTTP requests. Sets and gets HTTP headers. oWire=CREATEOBJECT("Rope.WireTransfer") oXML=oWire.GetPageByURI("http://www.digi.com/rr.xml")

More Related