Many people tend to use DOM to read XML files in VB and other languages.
I am currently accessing DOM through VB with this code structure:
But is it possible to build an XML file from scratch from within VB or Java (compiled or scripted) then export the resulting 'Virtual XML Document' to an XML file using a command such as:
xmldoc.save (App.Path & "\xml_test.xml")
If so, could someone give a small example of what commands to use (prefer VB code, but Java will work too)
Here is a Sample Target Structure to build for the Example...
If you don't feel like writing an example, but know of a link where I could learn to do this, Please Post It
Also, if you wanted to Change the Type in the second OBJ from "Type2" to "Type3" how could you do that?
And/Or... Change:
To:
Much Thanks in Advance,
-Josh
Have Fun, Be Young... Code BASIC
-Josh
PROGRAMMER:
Red-eyed, mumbling mammal capable of conversing with inanimate objects.
I am currently accessing DOM through VB with this code structure:
Code:
Dim xmldoc As DOMDocument
Dim x As IXMLDOMNode
Set xmldoc = New DOMDocument
xmldoc.async = "false"
xmldoc.Load (App.Path & "\xml_test.xml")
Text1 = "Traversing the XML nodes"
For Each x In xmldoc.documentElement.childNodes
Text1 = Text1 & x.nodeName
Text1 = Text1 & ": "
Text1 = Text1 & x.Text
Text1 = Text1 & vbCrLf & vbCrLf
If x.nodeName = "" Then x.Set
Next
xmldoc.save (App.Path & "\xml_test2.xml")
But is it possible to build an XML file from scratch from within VB or Java (compiled or scripted) then export the resulting 'Virtual XML Document' to an XML file using a command such as:
xmldoc.save (App.Path & "\xml_test.xml")
If so, could someone give a small example of what commands to use (prefer VB code, but Java will work too)
Here is a Sample Target Structure to build for the Example...
Code:
<TEST>
<OBJ Type="Type1">
<NAME>Object 1</NAME>
<ITEM>Test Item1</ITEM>
<ITEM>Test Item2</ITEM>
</OBJ>
<OBJ Type="Type2">
<NAME>Object 2</NAME>
<ITEM>Test Item</ITEM>
</OBJ>
</TEST>
If you don't feel like writing an example, but know of a link where I could learn to do this, Please Post It
Also, if you wanted to Change the Type in the second OBJ from "Type2" to "Type3" how could you do that?
And/Or... Change:
Code:
<NAME>[b][COLOR=red]Object 2[/color][/b]</NAME>
Code:
<NAME>[b][COLOR=red]Object 3[/color][/b]</NAME>
Much Thanks in Advance,
-Josh
Have Fun, Be Young... Code BASIC
-Josh

PROGRAMMER: