xpath has a large number of nodes (113).

Bruce Hoenig <[email protected]>
Newsgroups gmane.comp.sysutils.cfengine.general
Message-ID <[email protected]>
I have an XML file I'd like to parse in order to get to a specific place 
and add a pair of nodes.
I didn't write the file and it's 387K.

My build+xpath is "/web-app/filter/filter-name";
If I  use a select_xpath => "//web-app/filter/filter-name";

Then a set_attribute: *LastFilter*
where inside the XML file has this unique string

   <filter>
        <filter-name>*LastFilter*</filter-name>
        <filter-class>web.filters.LastFilter</filter-class>
    </filter>

Will that get me into the node with that *LastFilter* attribute?
I believe the answer to this is yes.

How can I insert a block of XML text or even a preformatted block of XML 
text from a file before this xpath node? I actually want it before the 
*<filter> *

As I type this, my thought is to possibly use one or more delete trees to 
remove that entire filter tree and then several insert trees to add the 
additional filter sections and then rebuild the tree that was just deleted.

-- 
You received this message because you are subscribed to the Google Groups "help-cfengine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/help-cfengine/6c0dc794-f34f-4dd4-ba50-c9e0931f2549n%40googlegroups.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.