Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help in XML
#1
Sir, can you help me. how to get the value (in circle) using API command?
Thanks a lot.


Attached Files Image(s)
   
#2
XML parser
#3
Thank you very much..
#4
Using that link sample i get all of text, but how to get only the specific value?
ex. i want to know what name, status and charges if selection id=439?
need you to show me the simple example, Thanks a lot.
#5
Code:
Copy      Help
out
lpstr sx=
;<root>
;,<elem1>ABC</elem1>
;,<elem2>
;,,<xyz>XYZ</xyz>
;,</elem2>
;,<elem3 attr="35">GHI</elem3>
;,<elem3 attr="45">JKL</elem3>
;</root>

typelib MSXML2 {F5078F18-C551-11D3-89B9-0000F81FE221} 3.0
MSXML2.DOMDocument doc._create
doc.loadXML(sx)

;you can navigate to an XML node using doc.function.function...
str s=doc.documentElement.firstChild.nextSibling.firstChild.nodeName
out s

;...or by path
s=doc.selectSingleNode("root/elem3").text
out s

;more path examples

;get attribute
s=doc.selectSingleNode("root/elem3/@attr").text
out s

;get element with attribute attr=45
s=doc.selectSingleNode("root/elem3[@attr=45]").text
out s

;it is XPath. You can find information about it on the internet
#6
Wow, Thank you so much.. your information is very helpfull.
Great Support...
#7
the code formating looks so crisp,
can't wait to have that too Smile

it looks like a screenshot from scite, but it isn't.
i wonder if there a line numbers (why not ?).
pi


Forum Jump:


Users browsing this thread: 1 Guest(s)