Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7764411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T14:54:16+00:00 2026-06-01T14:54:16+00:00

Content of profile.xml: <files> <file folder=CaptureServer filename=CSConfig object=CSConfig> <Profile name=BBH1200Kofax> <OutputCache>\</OutputCache> <EncryptedConnectionString>564rgr=</EncryptedConnectionString> <ConvertDocsBeforeRelease>false</ConvertDocsBeforeRelease> </Profile>

  • 0

Content of profile.xml:

<files>
  <file folder="CaptureServer" filename="CSConfig" object="CSConfig">
    <Profile name="BBH1200Kofax">
      <OutputCache>\</OutputCache>
      <EncryptedConnectionString>564rgr=</EncryptedConnectionString>
      <ConvertDocsBeforeRelease>false</ConvertDocsBeforeRelease>
    </Profile>
  </file>
  <file folder="CaptureServices3" filename="CSConfig" object="CSConfig">
    <Profile name="BBH1200Kofax">
      <ReleaseToEnterprise>true</ReleaseToEnterprise>
      <CaptureServerUrl />
      <OutputCache />
      <Credentials>
        <EncryptedPassword>46s4rg=</EncryptedPassword>
        <UserName />
        <Domain />
      </Credentials>
      <ConvertDocsBeforeRelease>false</ConvertDocsBeforeRelease>
    </Profile>
  </file>
</files>

Content of rules.xml:

<file folder="" filename="Rules" object="ArrayOfIBarcodeRule">
  <Profile name="Test471">
    <IBarcodeRule>
      <RuleName>DOC-TESTTESTTEST-Code128</RuleName>
      <FieldSequenceNumber>1</FieldSequenceNumber>
      <FieldRectangle>
        <Location>
          <X>0</X>
          <Y>0</Y>
        </Location>
        <Size>
          <Width>0</Width>
          <Height>0</Height>
        </Size>
      </FieldRectangle>
      <SeparationValue>TESTTESTTEST</SeparationValue>
    </IBarcodeRule>
  </Profile>
</file>

I am trying to add the entire contents of rules.xml (the file node) as another node in profile.xml. As you can see, there are a bunch of other file nodes in the profile.xml, and the rules.xml would be another one.

This is the code I have tried, and it does not seem to do anything:

$xml = [xml](Get-Content ".\profile.xml")
$newxml = [xml](Get-Content ".\rules.xml")
$xml.ImportNode($newxml.get_DocumentElement(), $true)
$xml.Save(".\profile.xml")
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T14:54:18+00:00Added an answer on June 1, 2026 at 2:54 pm

    You’re really close but ImportNode only makes a copy and doesn’t actually insert the copied nodes into the document. Try this:

    $newNode = $newxml.ImportNode($xml.get_DocumentElement(), $true)
    $newxml.DocumentElement.AppendChild($newNode)
    $xml.Save("$pwd\profile.xml")  
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the Drupal 6 module Content Profile to allow using a CCK
I have a layout 'profile' <div> <div> $this->action(action1, controller1, module1)<div> <div> $this->layout()->content </div> <div>
header(Content-type: image/gif); readfile($filename); The above can only be used to show gif images. Is
I have been parsing xml content using the xmlreader and cannot use the xml
I am generating a valid iPhone Configuration XML Profile and delivering it via a
I have the following main.xml file with a LinearLayout <?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android
All, I have an XML document that looks something like this: <root> <profile> <childA>
I have been using a custom template file called user-profile.tpl.php for a while. But
Content type Events has intro, body and an event date field (using Date module).
Content: 1. Text is here. 20. More text. Why does this Vim search and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.