Code to parse a sitemap XML File?

J

JJ

This sounds easy but I'm going round in circles.

I need to make a copy of the file to another xml file, omitting the nodes
with a certain role.

??
 
S

Sebastián

I'd suggest to copy the entire XML and then go thru the destination deleting
the nodes you don't need.
Ugly, but it works... ;)
 
S

.seb

I don't remember exactly but while iterating thru a node child the XmlNode
or XMLElement should have a Remove method.
 
J

JJ

I've discovered that with security trimming enabled, if you can copy a node
at a time (- e.g. using the CurrentNode, NextSibling, ParentNode, and
PreviousSibling
methods) then security trimming filters out the nodes withthe roles I don't
want.

I just need to work out how to traverse the sitemap node by node and make a
copy......

[....stuck again]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,787
Messages
2,569,629
Members
45,330
Latest member
AlvaStingl

Latest Threads

Top