dcsimg
www.webdeveloper.com
Results 1 to 15 of 15

Thread: xml and child nodes

  1. #1
    Join Date
    Jan 2003
    Location
    Israel
    Posts
    1,381

    xml and child nodes

    i have an asp page which recives and xml page!
    how can where i recive and xml to know that <tag> name?
    i know how to read it's length
    xmldoc.childNodes(0).childNodes.length
    so how do i read it's tag name?
    thanks in advance
    Peleg

  2. #2
    Join Date
    Dec 2002
    Location
    Calgary, Canada
    Posts
    6,137
    nodeName
    will give you the name of the node/element
    Cheers

    Khalid

    Message Posting Guidelines In These Forums, Please read these before posting any question.
    Web site: webapplikations.com
    Web Resources Page:Web Resources

  3. #3
    Join Date
    Jan 2003
    Location
    Israel
    Posts
    1,381

    well i did that and i recived

    #text
    and that not my node name 9maybe nide type???)

  4. #4
    Join Date
    Dec 2002
    Location
    Calgary, Canada
    Posts
    6,137
    seems like you are doing something wrong..can you post the code that you are using this for like piece of XML code
    Cheers

    Khalid

    Message Posting Guidelines In These Forums, Please read these before posting any question.
    Web site: webapplikations.com
    Web Resources Page:Web Resources

  5. #5
    Join Date
    Jan 2003
    Location
    Israel
    Posts
    1,381

    this is part of the xml:

    <ROOT>xsi:type="ns2RSpecDataCollection"<errorMesage xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xsi:type="xsd:string"></errorMesage><DRSpecDataCount xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xsi:type="xsd:string" xsi:null="true"/><DRSpecDataArray xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xsi:type="ns3:Array" ns3:arrayType="ns2RSpecData[14]" xmlns:ns3="http://schemas.xmlsoap.org/soap/encoding/">
    <item xsi:type="ns2RSpecData">
    <houseNo xsi:type="xsd:string"> 14</houseNo>
    <parking xsi:type="xsd:string"></parking>
    <cityName xsi:type="xsd:string"> ירושלים</cityName>
    <DRType xsi:type="xsd:string"></DRType>
    <disabledAccess xsi:type="xsd:string"></disabledAccess>
    <fax xsi:type="xsd:string"> 02-5677688</fax>
    <regionName xsi:type="xsd:string"> ירושלים</regionName>
    <FName xsi:type="xsd:string"> עמוס</FName>
    <plcType xsi:type="xsd:string">פ</plcType>
    <licID xsi:type="xsd:string">13072</licID>
    <specialization xsi:type="xsd:string"> אף אוזן גרון</specialization>
    <plcName xsi:type="xsd:string"> סניף מסילת ישרים</plcName>
    <streetName xsi:type="xsd:string"> מסילת ישרים</streetName>
    <plcNo xsi:type="xsd:string">0017</plcNo>
    <zip xsi:type="xsd:string"></zip>
    <phone2 xsi:type="xsd:string"></phone2>
    <phone1 xsi:type="xsd:string"> 02-5677677</phone1>
    <LName xsi:type="xsd:string"> אילון</LName>
    </item>

  6. #6
    Join Date
    Dec 2002
    Location
    Calgary, Canada
    Posts
    6,137
    I see allots of errors in the xml.
    Here I have this generic node name node value reader script..

    http://68.145.35.86/skills/javascrip...AndValues.html
    Cheers

    Khalid

    Message Posting Guidelines In These Forums, Please read these before posting any question.
    Web site: webapplikations.com
    Web Resources Page:Web Resources

  7. #7
    Join Date
    Jan 2003
    Location
    Israel
    Posts
    1,381

    it is not possible u see an error

    beacuse if u open the xml in a browser u see that everything is ok
    more then that if there was an error xsl won't work with it
    i am attaaching here an xml example like the code i have opsted in my last message
    thanks
    peleg
    (just rename the file from *.txt to *.xml)
    Attached Files Attached Files

  8. #8
    Join Date
    Jan 2003
    Location
    Israel
    Posts
    1,381

    1 more thing

    maybe i have the problem beacuse in asp its diffrent then in javascript?

  9. #9
    Join Date
    Dec 2002
    Location
    Calgary, Canada
    Posts
    6,137
    Hey I just noticed you are in israel..I hope this is correct way of greeting

    Mashlam Kha..

    Please correct me if the greeting is wrong..

    And for your question.I am not sure how MS works,I am hopping it follows standard DOM
    Cheers

    Khalid

    Message Posting Guidelines In These Forums, Please read these before posting any question.
    Web site: webapplikations.com
    Web Resources Page:Web Resources

  10. #10
    Join Date
    Dec 2002
    Location
    Calgary, Canada
    Posts
    6,137
    I have fixed the IE crap and the link below works as it should..njoy..

    http://68.145.35.86/temp/pelegk1/XML...AndValues.html
    Cheers

    Khalid

    Message Posting Guidelines In These Forums, Please read these before posting any question.
    Web site: webapplikations.com
    Web Resources Page:Web Resources

  11. #11
    Join Date
    Jan 2003
    Location
    Israel
    Posts
    1,381

    Smile good mornning

    yes its correct to say ma shlomcha
    and from where are u?
    and what was the mistake in my xml(and if there was 1 why do isee it corect when i open te browser?)

  12. #12
    Join Date
    Dec 2002
    Location
    Calgary, Canada
    Posts
    6,137
    Compare code behind the both links I posted and you will see the difference,
    basically,it wasn't much of IE I just had to redo the way I get the information out of XML..
    Cheers

    Khalid

    Message Posting Guidelines In These Forums, Please read these before posting any question.
    Web site: webapplikations.com
    Web Resources Page:Web Resources

  13. #13
    Join Date
    Jan 2003
    Location
    Israel
    Posts
    1,381

    so what is your origion

    from your name i understand your family originlly not from canada

  14. #14
    Join Date
    Dec 2002
    Location
    Calgary, Canada
    Posts
    6,137

    Thats true,

    Originally from Pakistan...I had a brief friendship with some people from Israel several years ago....then they moved back to israel..I actually knew more words then only "ma shlomcha"
    but I guess I only remember this now..
    Cheers

    Khalid

    Message Posting Guidelines In These Forums, Please read these before posting any question.
    Web site: webapplikations.com
    Web Resources Page:Web Resources

  15. #15
    Join Date
    Jan 2003
    Location
    Israel
    Posts
    1,381

    ow cool

    here is a new word for u :
    "ata totach"
    (ata=you
    totach=canon)
    but it means your the man!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles