Private Sub PrettyPrint(Parent As IXMLDOMNode, Optional Level As Integer) Dim Node As IXMLDOMNode Dim Indent As IXMLDOMText If Not Parent.ParentNode Is Nothing And Parent.ChildNodes.Length > 0 Then For Each Node In Parent.ChildNodes...
Showing posts with label XML-VB6. Show all posts
Showing posts with label XML-VB6. Show all posts
Sunday, June 17, 2012
XML Pretty Print - Merapikan Format File XML
READ MORE - XML Pretty Print - Merapikan Format File XML
Labels:
XML-VB6
XML Tidy - Untuk Merapikan File XML
Public Function PrettyPrintXML(XML As String) As String Dim Reader As New SAXXMLReader60 Dim Writer As New MXXMLWriter60 Writer.Indent = True Writer.standalone = False Writer.omitXMLDeclaration = False Writer.encoding = "utf-8" Set...
Labels:
XML-VB6
Encode Decode Base64 Menggunakan MSXML
Public Function Base64Enc(ByRef vxbData() As Byte) As String With CreateObject("MSXML.DOMDocument").CreateElement(" Base64 ") .DataType = "bin.base64" .NodeTypedValue = vxbData Base64Enc = .Text End WithEnd FunctionPublic Function...
Labels:
Cryptography
,
String-Manipulation
,
XML-VB6
Contoh Memparsing XML Attributes
Private Sub Command1_Click() Dim fso As Object Dim sDir As String Dim doc As Object Dim oFile As Object Set fso = CreateObject("Scripting.FileSystemObject") sDir = "C:\work" Set doc = CreateObject("Msxml2.DOMDocument") doc.async...
Labels:
XML-VB6
Contoh Menggunakan tarts-with() Dalam Fungsi XPath
Private Sub Command1_Click() Dim doc As MSXML2.DOMDocument Dim nlist As MSXML2.IXMLDOMNodeList Dim node As MSXML2.IXMLDOMNode Set doc = New MSXML2.DOMDocument doc.setProperty "SelectionLanguage", "XPath" doc.Load "c:\books.xml" Set...
Labels:
XML-VB6
Contoh Kode XML Query XPath
Option ExplicitDim gCn As New ADODB.ConnectionConst DBGUID_DEFAULT As String = "{C8B521FB-5CF3-11CE-ADE5-00AA0044773D}"Const DBGUID_SQL As String = "{C8B522D7-5CF3-11CE-ADE5-00AA0044773D}"Const DBGUID_MSSQLXML As String = "{5D531CB2-E6Ed-11D2-B252-00C04F681B71}"Const...
Labels:
XML-VB6
VB6 Code - XML Yang Mengandung Binary Data
Option ExplicitDim oDoc As DOMDocumentDim DOCINPATH As StringDim XMLOUTPATH As StringDim DOCOUTPATH As StringPrivate Sub cmdCreateXML_Click() Dim oEle As IXMLDOMElement Dim oRoot As IXMLDOMElement Dim oNode As IXMLDOMNode DOCINPATH = App.Path...
Labels:
XML-VB6
Menggunakan XMLHTTP dan MSXML
Private Sub Command1_Click() Dim soapReq As String Dim objSOAPXMLDoc As New MSXML2.DOMDocument30 Dim objXMLHTTP As New MSXML2.XMLHTTP30 Dim btArr() As Byte Dim backSlashPos As Integer Dim fileNameNoPath As String soapReq = " " &...
XML VB6 - Mencari Node Tertentu Menggunakan XPath
Public Function SearchForNodes(ByVal strXML As String, ByVal strTag As String, ByVal strSearchText As String) As DOMDocument 'Will Search an XML String for a Tag-value pair and return 'the entire node containing that pair in the form 'of a DOM...
Labels:
XML-VB6
Parse XML Menggunakan Visual Basic 6.0
Sub ParseXmlDocument() Dim doc As New MSXML2.DOMDocument Dim success As Boolean success = doc.Load(App.Path & "\test.xml") If success = False Then MsgBox doc.parseError.reason Else Dim nodeList As MSXML2.IXMLDOMNodeList Set...
Labels:
XML-VB6
Thursday, June 14, 2012
Tidy XML Menggunakan XSL Transform - VB6 Source Code
Private Function TidyXML(sXML As String) As String Dim oXSLT As DOMDocument Dim XSL_FILE As String Dim sResult As String Const DoubleQuotes = """" Dim strText As String Dim objDom As DOMDocument Set objDom = New DOMDocument objDom.loadXML...
Labels:
XML-VB6
Saturday, June 9, 2012
Merger 2 File XML Menggunakan Visual Basic 6.0
Private Sub AddPostNew(XMLSource As String, XMLDestination As String) Dim strText As String Dim strPost As String Dim domFree As FreeThreadedDOMDocument60 Dim domApt As DOMDocument60 Dim node As IXMLDOMNode Dim clone As IXMLDOMNode...
Labels:
XML-VB6
Thursday, June 7, 2012
VB6 Code - Mengevaluasi XPath dengan XPath Checker
Berikut adalah kode VB6 yang digunakan untuk mengevaluasi XPath yang digunakan untuk melakukan query terhadap file XML: Option Explicit Private Sub cmdEvaluate_Click() On Error GoTo ErrHandler txtErrorXpath.Text = "" Dim doc As MSXML2.DOMDocument60...
Labels:
XML-VB6
Saturday, June 2, 2012
XML Pretty Print - Merapikan Format File XML
Private Sub PrettyPrint(Parent As IXMLDOMNode, Optional Level As Integer) Dim Node As IXMLDOMNode Dim Indent As IXMLDOMText If Not Parent.ParentNode Is Nothing And Parent.ChildNodes.Length > 0 Then For Each Node In Parent.ChildNodes...
Labels:
XML-VB6
Subscribe to:
Posts
(
Atom
)