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

  • Home
  • SEARCH
  • 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 7949865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T02:05:50+00:00 2026-06-04T02:05:50+00:00

I have a string which contains XML. I want to create an XMLdocument from

  • 0

I have a string which contains XML. I want to create an XMLdocument from this. I am using Load and LoadXMl methods like this:

   Dim doc As XmlDocument
            doc.LoadXml(applicationXml)

but they are retuning:

Object reference not set to an instance of an object.

My XML looks like this:

<gate.util.persistence.GateApplication>
  <urlList class="gate.util.persistence.CollectionPersistence">
    <localList>      
      <gate.util.persistence.PersistenceManager-URLHolder>
        <urlString>$gatehome$plugins/LingPipe/</urlString>
      </gate.util.persistence.PersistenceManager-URLHolder>
      <gate.util.persistence.PersistenceManager-URLHolder>
        <urlString>$gatehome$plugins/ANNIE/</urlString>
      </gate.util.persistence.PersistenceManager-URLHolder>
      <gate.util.persistence.PersistenceManager-URLHolder>
        <urlString>$gatehome$plugins/Stemmer_Snowball/</urlString>
      </gate.util.persistence.PersistenceManager-URLHolder>     
    </localList>
    <collectionType>java.util.ArrayList</collectionType>
  </urlList>
  <application class="gate.util.persistence.SerialAnalyserControllerPersistence">
    <prList class="gate.util.persistence.CollectionPersistence">
      <localList>
        <gate.util.persistence.PRPersistence>
          <runtimeParams class="gate.util.persistence.MapPersistence">
            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
            <localMap>
              <entry>
                <string>setsToKeep</string>
                <null />
              </entry>
              <entry>
                <string>document</string>
                <null/>
              </entry>
              <entry>
                <string>annotationTypes</string>
                <null/>
              </entry>
              <entry>
                <string>corpus</string>
                <null/>
              </entry>
              <entry>
                <string>keepOriginalMarkupsAS</string>
                <boolean>true</boolean>
              </entry>
              <entry>
                <string>setsToRemove</string>
                <null/>
              </entry>
            </localMap>
          </runtimeParams>
          <resourceType>gate.creole.annotdelete.AnnotationDeletePR</resourceType>
          <resourceName>Document Reset PR</resourceName>
          <initParams class="gate.util.persistence.MapPersistence">
            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
            <localMap/>
          </initParams>
          <features class="gate.util.persistence.MapPersistence">
            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
            <localMap/>
          </features>
        </gate.util.persistence.PRPersistence>
        <gate.util.persistence.LanguageAnalyserPersistence>
          <runtimeParams class="gate.util.persistence.MapPersistence">
            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
            <localMap>
              <entry>
                <string>annotationSetName</string>
                <null/>
              </entry>
              <entry>
                <string>document</string>
                <null/>
              </entry>
            </localMap>
          </runtimeParams>
          <resourceType>gate.creole.tokeniser.DefaultTokeniser</resourceType>
          <resourceName>ANNIE English Tokeniser</resourceName>
          <initParams class="gate.util.persistence.MapPersistence">
            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
            <localMap>
              <entry>
                <string>tokeniserRulesURL</string>
                <gate.util.persistence.PersistenceManager-URLHolder>
                  <urlString>$gatehome$plugins/ANNIE/resources/tokeniser/DefaultTokeniser.rules</urlString>
                </gate.util.persistence.PersistenceManager-URLHolder>
              </entry>
              <entry>
                <string>transducerGrammarURL</string>
                <gate.util.persistence.PersistenceManager-URLHolder>
                  <urlString>$gatehome$plugins/ANNIE/resources/tokeniser/postprocess.jape</urlString>
                </gate.util.persistence.PersistenceManager-URLHolder>
              </entry>
              <entry>
                <string>encoding</string>
                <string>UTF-8</string>
              </entry>
            </localMap>
          </initParams>
          <features class="gate.util.persistence.MapPersistence">
            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
            <localMap/>
          </features>
        </gate.util.persistence.LanguageAnalyserPersistence>
        <gate.util.persistence.LanguageAnalyserPersistence>
          <runtimeParams class="gate.util.persistence.MapPersistence">
            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
            <localMap>
              <entry>
                <string>annotationSetName</string>
                <null/>
              </entry>
              <entry>
                <string>document</string>
                <null/>
              </entry>
            </localMap>
          </runtimeParams>
          <resourceType>com.ontotext.gate.gazetteer.HashGazetteer</resourceType>
          <resourceName>TCG Gazetteer</resourceName>
          <initParams class="gate.util.persistence.MapPersistence">
            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
            <localMap>
              <entry>
                <string>listsURL</string>
                <gate.util.persistence.PersistenceManager-URLHolder>
                  <urlString>http://halo.dyndns-web.com:96/tcg/GATE/Gazetteers/MasterListsDef.def</urlString>
                </gate.util.persistence.PersistenceManager-URLHolder>
              </entry>
              <entry>
                <string>encoding</string>
                <string>UTF-8</string>
              </entry>
              <entry>
                <string>caseSensitive</string>
                <boolean>false</boolean>
              </entry>
            </localMap>
          </initParams>
          <features class="gate.util.persistence.MapPersistence">
            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
            <localMap/>
          </features>
        </gate.util.persistence.LanguageAnalyserPersistence>
        <gate.util.persistence.LanguageAnalyserPersistence>
          <runtimeParams class="gate.util.persistence.MapPersistence">
            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
            <localMap>
              <entry>
                <string>wholeWordsOnly</string>
                <boolean>true</boolean>
              </entry>
              <entry>
                <string>document</string>
                <null/>
              </entry>
              <entry>
                <string>longestMatchOnly</string>
                <boolean>true</boolean>
              </entry>
              <entry>
                <string>annotationSetName</string>
                <null/>
              </entry>
            </localMap>
          </runtimeParams>
          <resourceType>gate.creole.gazetteer.DefaultGazetteer</resourceType>
          <resourceName>ANNIE Gazetteer</resourceName>
          <initParams class="gate.util.persistence.MapPersistence">
            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
            <localMap>
              <entry>
                <string>gazetteerFeatureSeparator</string>
                <null/>
              </entry>
              <entry>
                <string>listsURL</string>
                <gate.util.persistence.PersistenceManager-URLHolder>
                  <urlString>$gatehome$plugins/ANNIE/resources/gazetteer/lists.def</urlString>
                </gate.util.persistence.PersistenceManager-URLHolder>
              </entry>
              <entry>
                <string>caseSensitive</string>
                <boolean>true</boolean>
              </entry>
              <entry>
                <string>encoding</string>
                <string>UTF-8</string>
              </entry>
            </localMap>
          </initParams>
          <features class="gate.util.persistence.MapPersistence">
            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
            <localMap/>
          </features>
        </gate.util.persistence.LanguageAnalyserPersistence>
        <gate.util.persistence.LanguageAnalyserPersistence>
          <runtimeParams class="gate.util.persistence.MapPersistence">
            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
            <localMap>
              <entry>
                <string>outputASName</string>
                <null/>
              </entry>
              <entry>
                <string>document</string>
                <null/>
              </entry>
              <entry>
                <string>inputASName</string>
                <null/>
              </entry>
            </localMap>
          </runtimeParams>
          <resourceType>gate.creole.splitter.SentenceSplitter</resourceType>
          <resourceName>ANNIE Sentence Splitter</resourceName>
          <initParams class="gate.util.persistence.MapPersistence">
            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
            <localMap>
              <entry>
                <string>encoding</string>
                <string>UTF-8</string>
              </entry>
              <entry>
                <string>gazetteerListsURL</string>
                <gate.util.persistence.PersistenceManager-URLHolder>
                  <urlString>$gatehome$plugins/ANNIE/resources/sentenceSplitter/gazetteer/lists.def</urlString>
                </gate.util.persistence.PersistenceManager-URLHolder>
              </entry>
              <entry>
                <string>transducerURL</string>
                <gate.util.persistence.PersistenceManager-URLHolder>
                  <urlString>$gatehome$plugins/ANNIE/resources/sentenceSplitter/grammar/main.jape</urlString>
                </gate.util.persistence.PersistenceManager-URLHolder>
              </entry>
            </localMap>
          </initParams>
          <features class="gate.util.persistence.MapPersistence">
            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
            <localMap/>
          </features>
        </gate.util.persistence.LanguageAnalyserPersistence>
        <gate.util.persistence.LanguageAnalyserPersistence>
          <runtimeParams class="gate.util.persistence.MapPersistence">
            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
            <localMap>
              <entry>
                <string>document</string>
                <null/>
              </entry>
              <entry>
                <string>corpus</string>
                <null/>
              </entry>
              <entry>
                <string>outputAnnotationType</string>
                <string>Token</string>
              </entry>
              <entry>
                <string>inputASName</string>
                <null/>
              </entry>
              <entry>
                <string>failOnMissingInputAnnotations</string>
                <boolean>true</boolean>
              </entry>
              <entry>
                <string>outputASName</string>
                <null/>
              </entry>
              <entry>
                <string>baseSentenceAnnotationType</string>
                <string>Sentence</string>
              </entry>
              <entry>
                <string>baseTokenAnnotationType</string>
                <string>Token</string>
              </entry>
            </localMap>
          </runtimeParams>
          <resourceType>gate.creole.POSTagger</resourceType>
          <resourceName>ANNIE POS Tagger</resourceName>
          <initParams class="gate.util.persistence.MapPersistence">
            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
            <localMap>
              <entry>
                <string>encoding</string>
                <null/>
              </entry>
              <entry>
                <string>rulesURL</string>
                <gate.util.persistence.PersistenceManager-URLHolder>
                  <urlString>$gatehome$plugins/ANNIE/resources/heptag/ruleset</urlString>
                </gate.util.persistence.PersistenceManager-URLHolder>
              </entry>
              <entry>
                <string>lexiconURL</string>
                <gate.util.persistence.PersistenceManager-URLHolder>
                  <urlString>$gatehome$plugins/ANNIE/resources/heptag/lexicon</urlString>
                </gate.util.persistence.PersistenceManager-URLHolder>
              </entry>
            </localMap>
          </initParams>
          <features class="gate.util.persistence.MapPersistence">
            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
            <localMap/>
          </features>
        </gate.util.persistence.LanguageAnalyserPersistence>
        <gate.util.persistence.LanguageAnalyserPersistence>
          <runtimeParams class="gate.util.persistence.MapPersistence">
            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
            <localMap>
              <entry>
                <string>outputASName</string>
                <null/>
              </entry>
              <entry>
                <string>document</string>
                <null />
              </entry>
              <entry>
                <string>inputASName</string>
                <null/>
              </entry>
            </localMap>
          </runtimeParams>
          <resourceType>gate.creole.ANNIETransducer</resourceType>
          <resourceName>ANNIE NE Transducer</resourceName>
          <initParams class="gate.util.persistence.MapPersistence">
            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
            <localMap>
              <entry>
                <string>encoding</string>
                <string>UTF-8</string>
              </entry>
              <entry>
                <string>annotationAccessors</string>
                <null/>
              </entry>
              <entry>
                <string>operators</string>
                <null/>
              </entry>
              <entry>
                <string>grammarURL</string>
                <gate.util.persistence.PersistenceManager-URLHolder>
                  <urlString>$gatehome$plugins/ANNIE/resources/NE/main.jape</urlString>
                </gate.util.persistence.PersistenceManager-URLHolder>
              </entry>
            </localMap>
          </initParams>
          <features class="gate.util.persistence.MapPersistence">
            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
            <localMap/>
          </features>
        </gate.util.persistence.LanguageAnalyserPersistence>
        <gate.util.persistence.LanguageAnalyserPersistence>
          <runtimeParams class="gate.util.persistence.MapPersistence">
            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
            <localMap>
              <entry>
                <string>annotationSetName</string>
                <null/>
              </entry>
              <entry>
                <string>document</string>
                <null/>
              </entry>
              <entry>
                <string>annotationTypes</string>
                <gate.util.persistence.CollectionPersistence>
                  <localList>
                    <string>Organization</string>
                    <string>Person</string>
                    <string>Location</string>
                    <string>Date</string>
                  </localList>
                  <collectionType>java.util.ArrayList</collectionType>
                </gate.util.persistence.CollectionPersistence>
              </entry>
            </localMap>
          </runtimeParams>
          <resourceType>gate.creole.orthomatcher.OrthoMatcher</resourceType>
          <resourceName>ANNIE OrthoMatcher</resourceName>
          <initParams class="gate.util.persistence.MapPersistence">
            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
            <localMap>
              <entry>
                <string>definitionFileURL</string>
                <gate.util.persistence.PersistenceManager-URLHolder>
                  <urlString>$gatehome$plugins/ANNIE/resources/othomatcher/listsNM.def</urlString>
                </gate.util.persistence.PersistenceManager-URLHolder>
              </entry>
              <entry>
                <string>minimumNicknameLikelihood</string>
                <double>0.5</double>
              </entry>
              <entry>
                <string>extLists</string>
                <boolean>true</boolean>
              </entry>
              <entry>
                <string>encoding</string>
                <string>UTF-8</string>
              </entry>
              <entry>
                <string>caseSensitive</string>
                <boolean>false</boolean>
              </entry>
              <entry>
                <string>highPrecisionOrgs</string>
                <boolean>false</boolean>
              </entry>
              <entry>
                <string>personType</string>
                <string>Person</string>
              </entry>
              <entry>
                <string>processUnknown</string>
                <boolean>true</boolean>
              </entry>
              <entry>
                <string>organizationType</string>
                <string>Organization</string>
              </entry>
            </localMap>
          </initParams>
          <features class="gate.util.persistence.MapPersistence">
            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
            <localMap/>
          </features>
        </gate.util.persistence.LanguageAnalyserPersistence>
        <gate.util.persistence.PRPersistence>
          <runtimeParams class="gate.util.persistence.MapPersistence">
            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
            <localMap>
              <entry>
                <string>document</string>
                <null/>
              </entry>
              <entry>
                <string>annotationSetName</string>
                <null/>
              </entry>
              <entry>
                <string>annotationType</string>
                <string>Token</string>
              </entry>
              <entry>
                <string>annotationFeature</string>
                <string>string</string>
              </entry>
            </localMap>
          </runtimeParams>
          <resourceType>stemmer.SnowballStemmer</resourceType>
          <resourceName>Stemmer</resourceName>
          <initParams class="gate.util.persistence.MapPersistence">
            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
            <localMap>
              <entry>
                <string>language</string>
                <string>english</string>
              </entry>
            </localMap>
          </initParams>
          <features class="gate.util.persistence.MapPersistence">
            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
            <localMap/>
          </features>
        </gate.util.persistence.PRPersistence>
      </localList>
      <collectionType>java.util.ArrayList</collectionType>
    </prList>
    <resourceType>gate.creole.SerialAnalyserController</resourceType>
    <resourceName>ANNIE</resourceName>
    <initParams class="gate.util.persistence.MapPersistence">
      <mapType>gate.util.SimpleFeatureMapImpl</mapType>
      <localMap/>
    </initParams>
    <features class="gate.util.persistence.MapPersistence">
      <mapType>gate.util.SimpleFeatureMapImpl</mapType>
      <localMap/>
    </features>
  </application>
</gate.util.persistence.GateApplication>

Please suggest solution to this.

  • 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-04T02:05:51+00:00Added an answer on June 4, 2026 at 2:05 am

    Seems like you need to use New keyword since XmlDocument is a reference type:

      Dim doc as XmlDocument = new XmlDocument()
    

    see http://msdn.microsoft.com/en-us/library/system.xml.xmldocument.loadxml.aspx#Y0 for more details.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I have a string which contains proper xml format and I want to
I want to know that I have the string.xml Resource file which contains status
I have a string which contains XML. I want to remove its first line
I have a string which contains XML data and I want to convert it
I have a string which contains only numbers. Now I want to remove all
I have a string which contains a series of bits (like 01100011) and some
I have an Excel worksheet in XML format which contains <Cell ss:StyleID=s127><Data ss:Type=String>Replace Me</Data></Cell>
I have a string that contains well formed xml in it. I want to
I have books.xml file which contains author name and book titles. I am using
I have an xml file which contains query details like <queries> <query> <name>GetStudentById</name> <statement>select

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.