Click here to Skip to main content
15,899,026 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: can picture boxes be mathmatically different then they appear Pin
Dave Kreskowiak4-May-09 2:03
mveDave Kreskowiak4-May-09 2:03 
QuestionWhich libray will be used in Visual Basic 6 [modified] Pin
M Riaz Bashir3-May-09 20:11
M Riaz Bashir3-May-09 20:11 
AnswerRe: Which libray will be used in Visual Basic 6 Pin
Christian Graus3-May-09 22:20
protectorChristian Graus3-May-09 22:20 
AnswerRe: Which libray will be used in Visual Basic 6 Pin
Tiyani Miyambo4-May-09 0:27
Tiyani Miyambo4-May-09 0:27 
AnswerRe: Which libray will be used in Visual Basic 6 Pin
Johan Hakkesteegt4-May-09 1:24
Johan Hakkesteegt4-May-09 1:24 
AnswerRe: Which libray will be used in Visual Basic 6 Pin
Baran M4-May-09 1:25
Baran M4-May-09 1:25 
AnswerRe: Which libray will be used in Visual Basic 6 Pin
Dave Kreskowiak4-May-09 2:00
mveDave Kreskowiak4-May-09 2:00 
Questionurgent help required .. How to remove XMLNS namespace in child nodes (urgent) Pin
Member 61613673-May-09 19:53
Member 61613673-May-09 19:53 
I have to writen the XML file in VB 6.0

<Globus xmlns:xsi = 'http://www.w3.org/2001/XMLSchema-instance'

xmlns = 'http://www.temenos.com/GLOBUS/OFSML/120'

xsi:schemaLocation = 'http://www.temenos.com/GLOBUS/OFSML/120 ../../xsd/ofsml.xsd'>
<ofsmlHeader xsi:nil="true" />

<serviceRequest >
<securityContext>

<userName>INPUTT</userName>

<password>123456</password>

<company>VN0010001</company>

</securityContext>

<ofsStandardEnquiry name = 'ACCOUNT-IBS'>

<selectionCriteria operand = "EQ">

<fieldName>ACCOUNT.NUMBER</fieldName>

<value>002100000415&lt</value>

</selectionCriteria>

</ofsStandardEnquiry>

</serviceRequest>

</Globus>




So i have written as


         Dim objDOM As New MSXML2.DOMDocument30
   Dim objnode As MSXML2.IXMLDOMNode
   Dim objChildNode As MSXML2.IXMLDOMNode

   Dim ObjServicereq As MSXML2.IXMLDOMNode
   Dim objserviceCon As MSXML2.IXMLDOMNode
   Dim ofsStandardEnquiry As MSXML2.IXMLDOMNode
   Dim objattribute As MSXML2.IXMLDOMAttribute
   Dim objattribute1 As MSXML2.IXMLDOMAttribute
   Dim objattribute2 As MSXML2.IXMLDOMAttribute
   Dim objelement As MSXML2.IXMLDOMElement
   Dim objelement1 As MSXML2.IXMLDOMElement
   Dim objattribute3 As MSXML2.IXMLDOMAttribute
   Dim objattribute4 As MSXML2.IXMLDOMAttribute
   Dim objattribute5 As MSXML2.IXMLDOMAttribute
  
'   Set objNode = objDOM.createNode(NODE_PROCESSING_INSTRUCTION, "xml", "")
'   objDOM.appendChild objNode
'
  
  
   Set objnode = objDOM.createNode(NODE_ELEMENT, "GLOBUS", "")
      Set objelement = objnode
'
   Set objattribute = objDOM.createAttribute("xmlns:xsi")
   objattribute.Text = "http://www.w3.org/2001/XMLSchema-instance"
   objelement.setAttributeNode objattribute
'
      Set objattribute1 = objDOM.createAttribute("xmlns")
      objattribute1.Text = "http://www.temenos.com/GLOBUS/OFSML/120"
      objelement.setAttributeNode objattribute1

      Set objattribute2 = objDOM.createAttribute("xsi:schemaLocation")
      objattribute2.Text = "http://www.temenos.com/GLOBUS/OFSML/120 ../../xsd/ofsml.xsd"
      objelement.setAttributeNode objattribute2

'
     
      Set objattribute = Nothing
      Set objattribute1 = Nothing
      Set objattribute2 = Nothing
  
     
      Set objChildNode = objDOM.createNode(NODE_ELEMENT, "ofsmlHeader", "")
      Set objattribute3 = objDOM.createAttribute("xsi:nil")
      objattribute3.Text = "true"
     
      Set objelement1 = objChildNode
      objnode.appendChild objChildNode
      objelement1.setAttributeNode objattribute3

      Set objelement1 = Nothing
      Set ObjServicereq = objDOM.createNode(NODE_ELEMENT, "serviceRequest", "")
      objChildNode.appendChild ObjServicereq


  
   Set objserviceCon = objDOM.createNode(NODE_ELEMENT, "securityContext", "")
  
      Dim xmlElmName As MSXML2.IXMLDOMElement
      Set xmlElmName = objDOM.createElement("userName")
      objserviceCon.appendChild xmlElmName
      xmlElmName.Text = "INPUTT"

Dim xmlElmPASSWORD As MSXML2.IXMLDOMElement
Set xmlElmPASSWORD = objDOM.createElement("password")
objserviceCon.appendChild xmlElmPASSWORD
xmlElmPASSWORD.Text = "123456"


Dim xmlElmcompany As MSXML2.IXMLDOMElement
Set xmlElmcompany = objDOM.createElement("company")
objserviceCon.appendChild xmlElmcompany
   xmlElmcompany.Text = "VN0010001"
  
   objnode.appendChild ObjServicereq
   ObjServicereq.appendChild objserviceCon
   Set objserviceCon = Nothing
  
  
   Set ofsStandardEnquiry = objDOM.createNode(NODE_ELEMENT, "ofsStandardEnquiry", "")
         Set objattribute4 = objDOM.createAttribute("NAME")
   objattribute4.Text = "ACCOUNT-IBS"
   Set objelement = ofsStandardEnquiry
   objnode.appendChild ofsStandardEnquiry
   objelement.setAttributeNode objattribute4
         ObjServicereq.appendChild ofsStandardEnquiry
  
         Dim objselectioncriteria As MSXML2.IXMLDOMNode
            Set objselectioncriteria = objDOM.createNode(NODE_ELEMENT, "selectionCriteria", "")
            Set objattribute5 = objDOM.createAttribute("Operand")
         objattribute5.Text = "EQ"
            Set objelement = objselectioncriteria
            ObjServicereq.appendChild objselectioncriteria
            objelement.setAttributeNode objattribute5
            Set objelement = Nothing
           
           
           
            Dim xmlElmfieldName As MSXML2.IXMLDOMElement
            Set xmlElmfieldName = objDOM.createElement("fieldName")
            objselectioncriteria.appendChild xmlElmfieldName
            xmlElmfieldName.Text = "CUSTOMER.CODE"


Dim xmlElmvalue As MSXML2.IXMLDOMElement
Set xmlElmvalue = objDOM.createElement("value")
objselectioncriteria.appendChild xmlElmvalue
   xmlElmvalue.Text = "100297"

   objnode.appendChild ObjServicereq
   objDOM.appendChild objnode
   Set objelement = Nothing
      Set objChildNode = Nothing
      Set objselectioncriteria = Nothing
      Set ofsStandardEnquiry = Nothing
      Set ObjServicereq = Nothing
   Set objnode = Nothing
  
   MsgBox objDOM.xml
   objDOM.save ("C:\SCBDATA\Request\Request_ACC.XML")
   Debug.Print objDOM.xml
   Set objDOM = Nothing
   ' Call GENCUST
End Sub  

but i get output as


<Globus xmlns:xsi = 'http://www.w3.org/2001/XMLSchema-instance'

xmlns = 'http://www.temenos.com/GLOBUS/OFSML/120'

xsi:schemaLocation = 'http://www.temenos.com/GLOBUS/OFSML/120 ../../xsd/ofsml.xsd'>;

<ofsmlHeader xmlns = "" xsi:nil="true" />;

<serviceRequest xmlns = "" >
<securityContext>

<userName>INPUTT</userName>

<password>123456</password>;

<company>VN0010001</company>;

</securityContext>;

<ofsStandardEnquiry name = 'ACCOUNT-IBS'>

<selectionCriteria operand = "EQ">

<fieldName>ACCOUNT.NUMBER&lt</fieldName>

<value>002100000415</value>

</selectionCriteria>

</ofsStandardEnquiry>

</serviceRequest>

</Globus>




xmlns = ""   is repeating at ofsmlheaser and service request ,.. please help me like how to write it by getting it correctly .

So please suggest me any way in VB 6.o to make the xmlns="" no get repeated for child nodes ...
AnswerRe: urgent help required .. How to remove XMLNS namespace in child nodes (urgent) Pin
Christian Graus3-May-09 22:21
protectorChristian Graus3-May-09 22:21 
GeneralRe: urgent help required .. How to remove XMLNS namespace in child nodes (urgent) Pin
Member 61613673-May-09 23:28
Member 61613673-May-09 23:28 
QuestionDisplay the Excel Book in Vb.Net. Pin
Nanda_MR3-May-09 19:07
Nanda_MR3-May-09 19:07 
QuestionCommunicate over ethernet port (VS2005, Vista) Pin
Chun23-May-09 13:27
Chun23-May-09 13:27 
AnswerRe: Communicate over ethernet port (VS2005, Vista) Pin
Dave Kreskowiak4-May-09 1:57
mveDave Kreskowiak4-May-09 1:57 
Questionip adress Pin
andreas_6352-May-09 23:43
andreas_6352-May-09 23:43 
AnswerRe: ip adress Pin
Mycroft Holmes2-May-09 23:46
professionalMycroft Holmes2-May-09 23:46 
GeneralRe: ip adress Pin
andreas_6352-May-09 23:54
andreas_6352-May-09 23:54 
GeneralRe: ip adress Pin
Eddy Vluggen2-May-09 23:57
professionalEddy Vluggen2-May-09 23:57 
AnswerRe: ip adress Pin
Veldrain3-May-09 16:46
Veldrain3-May-09 16:46 
AnswerRe: ip adress Pin
Samir Ibrahim3-May-09 22:12
Samir Ibrahim3-May-09 22:12 
AnswerRe: ip adress Pin
Luc Pattyn3-May-09 23:11
sitebuilderLuc Pattyn3-May-09 23:11 
GeneralRe: ip adress Pin
Samir Ibrahim4-May-09 0:24
Samir Ibrahim4-May-09 0:24 
GeneralRe: ip adress Pin
Luc Pattyn4-May-09 0:48
sitebuilderLuc Pattyn4-May-09 0:48 
GeneralRe: ip adress Pin
Samir Ibrahim4-May-09 1:08
Samir Ibrahim4-May-09 1:08 
GeneralRe: ip adress Pin
Luc Pattyn4-May-09 1:33
sitebuilderLuc Pattyn4-May-09 1:33 
GeneralRe: ip adress Pin
Samir Ibrahim4-May-09 2:44
Samir Ibrahim4-May-09 2:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.