Hi Gertone, this returns me all MarkObject of every MarkElement with MarkObjectType='TEXT'. What if I want to display all the MarkObject with MarkObjectType='TEXT' of the first MarkTemplate only?
Main Topics
Browse All TopicsI have this javascript code, but it only retrieve all MarkMethod nodes that met the condition of MarkObjectType=TEXT
How do i change the code to include also MarkObjectText, MarkInfo nodes in the result?
var MatchingNodes=theRoot.sele
var outMarkHtml2 ="<table id='MarkText2'>"
for (i=0;i<MatchingNodes.lengt
outMarkHtml2+= "<tr><td>" + MatchingNodes.item(i).text
}
outMarkHtml2+="</table>";
document.write(outMarkHtml
}
This is my XML :
<?xml version="1.0" encoding="utf-8"?>
<ArrayOfMarkTemplate>
<MarkTemplate>
<MarkType>MARKTYPE001</Mar
<ImageId>854</ImageId>
<MarkingObjects>
<MarkObject>
<MarkObjectType>TEXT</Mark
<ObjectText>TEXT001</Objec
<MarkMethod></MarkMethod>
<MarkInfo>Info</MarkInfo>
</MarkObject>
<MarkObject>
<MarkObjectType>TEXT</Mark
<ObjectText>TEXT002</Objec
<MarkInfo>Info</MarkInfo>
</MarkObject>
<MarkObject>
<MarkObjectType>TEXT</Mark
<ObjectText>TEXT003</Objec
<MarkInfo>Info001</MarkInf
</MarkObject>
<MarkObject>
<MarkObjectType>GRAPHIC</M
<ObjectText>GRAPHIC001</Ob
<MarkInfo>Info004</MarkInf
</MarkObject>
</MarkingObjects>
</MarkTemplate>
<MarkTemplate>
......
</MarkTemplate>
</ArrayOfMarkTemplate>
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: GertonePosted on 2006-11-10 at 01:54:41ID: 17912924
Hi sherly, yOfMarkTem plate/Mark Template/M arkingObje cts/MarkOb ject[MarkO bjectType= 'TEXT']/Ma rkMethod/
kingObject s/MarkObje ct[MarkObj ectType='T EXT']/Mark Method | t[MarkObje ctType='TE XT']/MarkO bjectText | t[MarkObje ctType='TE XT']/MarkI nfo")
> theRoot.selectNodes("/Arra
you can use the union symbol "|"
theRoot.selectNodes("//Mar
//MarkingObjects/MarkObjec
//MarkingObjects/MarkObjec
Cheers!