Click here to Skip to main content
14,638,346 members
Home » Discussions » XML / XSL
   

XML / XSL

 
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
Memberpedefetoll15-Nov-09 23:19 
QuestionXml to RDBMS table data transgformation Pin
rishi saraf13-Nov-09 1:53
Memberrishi saraf13-Nov-09 1:53 
QuestionSpace in attribute name Pin
Anir19829-Nov-09 20:59
MemberAnir19829-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
Membertassilo10-Nov-09 23:06 
QuestionHow can I traverse and read values in an XML using VBScript? Pin
Curtis Rowell6-Nov-09 1:03
MemberCurtis Rowell6-Nov-09 1:03 
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 
XPath?

Here's some VBscript that uses XPath to select the nodes you want

Dim attrValue, child1, child2, gChild1
zone = "Zone0"
dfgw = """192.168.25.1"""
WScript.Echo "Zone is: " & zone
WScript.Echo "dfgw is: " & dfgw
	
Set xDoc = CreateObject("Microsoft.XMLDOM")  'CreateObject("Msxml.DOMDocument") CreateObject("Microsoft.XMLDOM") 
xDoc.async = False
xDoc.load ("a.xml")  'Load XML document

xpathString = "//" & zone & "/DFGW[text() = '" & dfgw & "']/Company"
WScript.Echo xpathString

Set CompanyNodeList = xDoc.selectNodes(xpathString)
WScript.Echo CompanyNodeList.Length


You just need to be sure that the string values are correctly escaped when building the query.

Also - why the quotes around the string values?

Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

QuestionXml File Problems Pin
md_refay4-Nov-09 4:19
Membermd_refay4-Nov-09 4:19 
AnswerRe: Xml File Problems Pin
The Man from U.N.C.L.E.11-Nov-09 11:45
MemberThe Man from U.N.C.L.E.11-Nov-09 11:45 
QuestionXSD Unique Implementation and XPath Pin
Skippums2-Nov-09 12:33
MemberSkippums2-Nov-09 12:33 
AnswerRe: XSD Unique Implementation and XPath Pin
Christian Graus3-Nov-09 11:27
mveChristian 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
MemberSkippums4-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
MemberSoundman32.22-Nov-09 1:28 
AnswerRe: Sorted xml element while serialising Pin
Soundman32.22-Nov-09 3:58
MemberSoundman32.22-Nov-09 3:58 
Questionattribute centric Pin
Michael A. Klausmeyer1-Nov-09 8:27
MemberMichael A. Klausmeyer1-Nov-09 8:27 
QuestionHow to Password Protect a XML SpreadSheet Pin
ANSHUMAN44429-Oct-09 5:14
MemberANSHUMAN44429-Oct-09 5:14 
AnswerRe: How to Password Protect a XML SpreadSheet Pin
Christian Graus1-Nov-09 9:30
mveChristian Graus1-Nov-09 9:30 
QuestionC# XML datagridview delete row Pin
Wheels01227-Oct-09 3:38
MemberWheels01227-Oct-09 3:38 
QuestionC# Append XML File Pin
Wheels01223-Oct-09 5:42
MemberWheels01223-Oct-09 5:42 
AnswerRe: C# Append XML File Pin
Christian Graus23-Oct-09 10:35
mveChristian Graus23-Oct-09 10:35 
GeneralRe: C# Append XML File Pin
Wheels01226-Oct-09 1:24
MemberWheels01226-Oct-09 1:24 
QuestionIs it possible to call a comand line program from within an Xml File Preprocessor Pin
ONeil Tomlinson23-Oct-09 1:09
MemberONeil Tomlinson23-Oct-09 1:09 

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.