Hi Gurus,
I am new to VBA.I am trying to create some tool using VBA to read xml documents.
The code is giving error when i try to read an XML document which contains some commented code.
the code i am using is:
Sub get_Jndi_Location()
Dim oXmlDoc As DOMDocument
Dim oXmlNode As IXMLDOMNode
Dim oXmlNodes As IXMLDOMNodeList
Set oXmlDoc = New DOMDocument
Dim brtn As Boolean
Dim onode As IXMLDOMElement
oXmlDoc.Load ("D:\User\WorkSpace\excel_xml\DB_API_FPC_CREATE_SR_GENERIC.wsdl")
serviceName = "DB_API_FPC_CREATE_SR_GENERIC.wsdl"
For Each onode In oXmlDoc.selectNodes("//service")
Debug.Print serviceName
For Each portNode In onode.childNodes
For Each locationNode In portNode.childNodes
Debug.Print locationNode.getAttribute("location")
Next locationNode
Next portNode
Next
End Sub
The XML Document i am trying to read is :
<definitions
name="DB_API_FPC_CREATE_SR_GENERIC"
targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/db/DB_API_FPC_CREATE_SR_GENERIC/"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://xmlns.oracle.com/pcbpel/adapter/db/DB_API_FPC_CREATE_SR_GENERIC/"
xmlns:db="http://xmlns.oracle.com/pcbpel/adapter/db/APPS/FPC_CREATE_SR_GENERIC/CREATE_SERVICE_REQUEST/"
xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
xmlns:jca="http://xmlns.oracle.com/pcbpel/wsdl/jca/"
xmlns:hdr="http://xmlns.oracle.com/pcbpel/adapter/db/"
>
<service name="DB_API_FPC_CREATE_SR_GENERIC">
<port name="DB_API_FPC_CREATE_SR_GENERIC_pt" binding="tns:DB_API_FPC_CREATE_SR_GENERIC_binding">
<!--Your runtime connection is declared in
J2EE_HOME/application-deployments/default/DbAdapter/oc4j-ra.xml -->
<jca:address location="fai/ebiz/db/ph2rel2"/>
<!--UIConnectionName="FAI"
ManagedConnectionFactory="oracle.tip.adapter.db.DBManagedConnectionFactory"
mcf.DriverClassName="oracle.jdbc.OracleDriver"
mcf.PlatformClassName="oracle.toplink.internal.databaseaccess.Oracle9Platform"
mcf.ConnectionString="jdbc:oracle:thin:@sv-fadevdb01.fjcs.net:1551:C1ERP"
mcf.UserName="Apps"
mcf.Password="423C8D76B4B565AE04903C88DEB72A67" /> -->
</port>
</service>
<plt:partnerLinkType name="DB_API_FPC_CREATE_SR_GENERIC_plt" >
<plt:role name="DB_API_FPC_CREATE_SR_GENERIC_role" >
<plt:portType name="tns:DB_API_FPC_CREATE_SR_GENERIC_ptt" />
</plt:role>
</plt:partnerLinkType>
</definitions>
I am trying to read the attribute of <jca:address location="fai/ebiz/db/ph2rel2"/> element
when i try to remove the comments the code is working.other wise it is giving the error Object doesn't support this property or method error.
Please do the needful.
Thanks in advance.
Bookmarks