XML Elves

XML Elves

<community>of XML and SVG Developers</community>


xml handling

This is a discussion on xml handling within the SVG Questions forums, part of the SVG Forums category; hi, in my map i have several objects.each object has a id. then i hava separate xml file containg data ...


Go Back   XML Elves > SVG Forums > SVG Questions

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Notices


Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-13-2004, 05:19 AM
kelum
Guest
 
Posts: n/a
Default xml handling

hi,
in my map i have several objects.each object has a id.
then i hava separate xml file containg data about each and every object.one tag contains the id field to identify the object.
when i click on the particular object i want to display those data.
is there any way to do this with svg.
have we use to any client side or server side scripting?
pls send your suggestions
regards,
kelum.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 07-13-2004, 06:52 AM
Anonymous
Guest
 
Posts: n/a
Default xml handling

You can with getURL and parseXML get your xml nodes.
You can append this nodes to your svg.

On click, you can client side find data and display them.

You can also add your data as parameter of your choice to your svg tag and display them.

Michel
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-15-2004, 07:46 AM
kelum
Guest
 
Posts: n/a
Default xml handling

as you mentioned above i add the xml to existing node like below.
this xml contains
<objectInfo id='objectData'>
<object id='aaa'>
<name>Empire Burlesque</name>
<address>Bob Dylan</address>
</object>
</objectInfo>

function getObjects()
{
svgdoc4 = evt.target.ownerDocument
getURL("objectInfo.xml",callback1)

}
function callback1(data)
{
if (data.success)
{
object_node= parseXML(data.content,svgdoc4)

svgdoc4.getElementById("base").appendChild(object_ node)

}

}

then i try to retrive this.it will give errors.

function getObjectInfo(evt){
getObjects()

svgdoc3 =evt.target.ownerDocument

//retreive data from added xml
cnodes=svgdoc3.getElementById("objectData").childN odes
nodeVal=cnodes.item[0].getAttributeNS(null,"id")

//display
idVal = svgdoc3.getElementById("idVal");
idVal =idVal.getFirstChild();
idVal.setData(nodeVal)


}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-13-2005, 03:10 AM
Anonymous
Guest
 
Posts: n/a
Default xml handling

I am having the same problem have reched anything yet....
please if yea,,,,mail me
shourbagui@gmail.com
or
amshourbagui@yahoo.com with the svg developers group
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-13-2005, 03:22 AM
Anonymous
Guest
 
Posts: n/a
Default xml handling

Problem is here :
Quote:
nodeVal=cnodes.item[0].getAttributeNS(null,"id")
First use item() and not item[]
Second in ASV, linefeed is a child so cnodes.item(0) is linefeed ...
Use id of child or use nextSibling

Michel
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
handling, xml


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -6. The time now is 09:39 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0

Printer Inks...
Order all printer inks and digital requirements from this company.

Hard Disk Drive Data Recovery Cheshire...
Recover data from servers, desktops/laptops, DVDs and CDs! Visit this site.

ink cartridges Free UK Delivery on ink cartridges such as Canon, Dell, Epson, hp & Lexmark.

1 2 3 4 5 6 7 8 9 10