/    Sign up×
Community /Pin to ProfileBookmark

XML page parsing

Hey everone,

I have a problem and wondering if anybody can help.

I have an .xml page that contains certain tags (let’s say <group> and <link>).
Within my .xsl file I need to parse .xml page choose tags with names <group> and <link> and according to properties/atrributes of those links chage some properties/attributes of those tags.

For example:
.xml page has the following

<Group Id=”Group_DSKFJDK” Width=”200px” Height=”0px” Design=”PRIMARYCOLOR” IsTextTitle=”true” ScrollingMode=”NONE” HasTitleCaption=”false” HasToolbar=”false” HasContentPadding=”false” HeaderVisible=”false” FormatTitleControl=”false” DesignTimeID=”Group_FAHDKD”>

<Link Id=”Link_DSFLJLDFJ” Size=”DEFAULT” IsTextLink=”true” HasReference=”false” Enabled=”true” HasPopupMenu=”false” HasLinkCaption=”false” Wrapping=”true” IsNested=”false” DesignTimeID=”Link_IVLOOSMRLHI”>

What I want is to check if <Link …> is clicked than change Design property/attribute of <Group> to let’s say SECONDARYCOLOR.
However, I have many <Group> and <Link> tags in my .xml page. I know there are method such as getElementsByID to get needed tags. But once I get them into a collection can I access them let’s say through a for loop and then change the Design property of one of the <group> tags when a user clicks on <Link>? Thank you very much! ?

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @gnorkin spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...