Click here to Skip to main content
15,905,913 members
Home / Discussions / XML / XSL
   

XML / XSL

 
GeneralRe: How to embed images in to xml file? Pin
Ghydo23-Nov-09 6:42
Ghydo23-Nov-09 6:42 
Question'_Chairs' is an unexpected token. The expected token is '='. Line 1, position 545. Pin
Vimalsoft(Pty) Ltd16-Nov-09 0:03
professionalVimalsoft(Pty) Ltd16-Nov-09 0:03 
AnswerRe: '_Chairs' is an unexpected token. The expected token is '='. Line 1, position 545. Pin
Richard MacCutchan16-Nov-09 0:17
mveRichard MacCutchan16-Nov-09 0:17 
GeneralRe: '_Chairs' is an unexpected token. The expected token is '='. Line 1, position 545. Pin
Vimalsoft(Pty) Ltd16-Nov-09 0:22
professionalVimalsoft(Pty) Ltd16-Nov-09 0:22 
QuestionXQuery / multiple conditions Pin
pedefetoll15-Nov-09 23:19
pedefetoll15-Nov-09 23:19 
QuestionXml to RDBMS table data transgformation Pin
rishi saraf13-Nov-09 1:53
rishi saraf13-Nov-09 1:53 
QuestionSpace in attribute name Pin
Anir19829-Nov-09 20:59
Anir19829-Nov-09 20:59 
AnswerRe: Space in attribute name Pin
Stuart Dootson9-Nov-09 23:01
professionalStuart Dootson9-Nov-09 23:01 
AnswerRe: Space in attribute name Pin
tassilo10-Nov-09 23:06
tassilo10-Nov-09 23:06 
QuestionHow can I traverse and read values in an XML using VBScript? Pin
Curtis Rowell6-Nov-09 1:03
Curtis Rowell6-Nov-09 1:03 
Given the xml snippet below, I am trying to read the Company value. I have other code which will obtain the Network Policy Zone and the Default Gateway of a given system. Using these two values, zone first, then dfgw, I need to get the Company value which correspondes so it can be set as an environment variable in a remote windows system.

Here's my mess of code, and I'm afraid it is a mess because I've been trying different things:

Sub ReadXML()
	Dim attrValue, child1, child2, gChild1
	getZone()
	WScript.Echo "Zone is: " & zone
		
	Set xDoc = CreateObject("Microsoft.XMLDOM")  'CreateObject("Msxml.DOMDocument") CreateObject("Microsoft.XMLDOM") 
	xDoc.async = False
	xDoc.load ("company.xml")  'Load XML document
	Set Root = xDoc.documentElement
	Set NodeList = Root.getElementsByTagName(zone)
	
	Set child1 = xDoc.documentElement.firstChild 
	Set child2 = child1.nextSibling 
	Set gChild1 = child1.firstChild
	
	Do Until attrValue <> dfgw
	attrValue  = xDoc.GetAttrValue("DFGW")
	WScript.Echo("DFGW Attribute Value is: " & attrValue)
	xDoc.nextSibling
	Loop
	
	company = gChild1.nodeValue("Company")
	WScript.Echo("Company Attribute Value is: " & attrValue)
	
	
	'Set ElemList = xDoc.getElementsByTagName("Zone0")
	'dfgw = ElemList.item(0).getAttribute("DFGW")
	
	WScript.Echo("Default Gateway: " & dfgw)
	'company = "BMC Software, Inc."
	SetCompany(company)
		
End Sub



Here's the XML I'm trying to read:

<br />
  <?xml version="1.0" ?> <br />
- <ZoneList><br />
- <Zone0><br />
- <DFGW><br />
  "192.168.25.1" <br />
  <Company>"CPC"</Company> <br />
  </DFGW><br />
- <DFGW><br />
  "142.101.230.1" <br />
  <Company>"Test Company"</Company> <br />
  </DFGW><br />
- <DFGW><br />
  "" <br />
  <Company>""</Company> <br />
  </DFGW><br />
- <DFGW><br />
  "" <br />
  <Company>""</Company> <br />
  </DFGW><br />
- <DFGW><br />
  "" <br />
  <Company>""</Company> <br />
  </DFGW><br />
  </Zone0><br />
- <Zone1><br />

AnswerRe: How can I traverse and read values in an XML using VBScript? Pin
Stuart Dootson9-Nov-09 4:08
professionalStuart Dootson9-Nov-09 4:08 
QuestionXml File Problems Pin
md_refay4-Nov-09 4:19
md_refay4-Nov-09 4:19 
AnswerRe: Xml File Problems Pin
The Man from U.N.C.L.E.11-Nov-09 11:45
The Man from U.N.C.L.E.11-Nov-09 11:45 
QuestionXSD Unique Implementation and XPath Pin
Skippums2-Nov-09 12:33
Skippums2-Nov-09 12:33 
AnswerRe: XSD Unique Implementation and XPath Pin
Christian Graus3-Nov-09 11:27
protectorChristian Graus3-Nov-09 11:27 
AnswerRe: XSD Unique Implementation and XPath Pin
Stuart Dootson3-Nov-09 22:54
professionalStuart Dootson3-Nov-09 22:54 
GeneralRe: XSD Unique Implementation and XPath Pin
Skippums4-Nov-09 2:28
Skippums4-Nov-09 2:28 
GeneralRe: XSD Unique Implementation and XPath Pin
Stuart Dootson4-Nov-09 2:52
professionalStuart Dootson4-Nov-09 2:52 
QuestionSorted xml element while serialising Pin
Soundman32.22-Nov-09 1:28
Soundman32.22-Nov-09 1:28 
AnswerRe: Sorted xml element while serialising Pin
Soundman32.22-Nov-09 3:58
Soundman32.22-Nov-09 3:58 
Questionattribute centric Pin
Michael A. Klausmeyer1-Nov-09 8:27
Michael A. Klausmeyer1-Nov-09 8:27 
QuestionHow to Password Protect a XML SpreadSheet Pin
ANSHUMAN44429-Oct-09 5:14
ANSHUMAN44429-Oct-09 5:14 
AnswerRe: How to Password Protect a XML SpreadSheet Pin
Christian Graus1-Nov-09 9:30
protectorChristian Graus1-Nov-09 9:30 
QuestionC# XML datagridview delete row Pin
Wheels01227-Oct-09 3:38
Wheels01227-Oct-09 3:38 
QuestionC# Append XML File Pin
Wheels01223-Oct-09 5:42
Wheels01223-Oct-09 5:42 

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.