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 271155
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T00:07:00+00:00 2026-05-12T00:07:00+00:00

My customer doesn’t want a database but would prefer to update their data in

  • 0

My customer doesn’t want a database but would prefer to update their data in an XML file. This is all well and good. However, they also want their items to be submitted to Google products. This complicates things a bit. I decided to attempt to just use the Google XML file for the database rather than create and maintain two separate files, but I’ve just hit a roadblock. My XML is like this:

<?xml version="1.0" encoding="utf-8" ?>
<feed xmlns:g="http://base.google.com/ns/1.0" 
xmlns:c="http://base.google.com/cns/1.0" xmlns="http://www.w3.org/2005/Atom">
<title>Company Product and Price Catalog</title>
<link rel="self" href="http://www.example.com" />
<author>
    <name>Some Company</name>
</author>
<id>tag:example.com:/App_Data/</id>
    <entry>
             <id>1</id>
        <title>Product Title</title>
        <g:price>100.00</g:price>
        <link href="http://www.example.com/product" />
        <g:image_link>http://www.example.com/images/product.jpg</g:image_link>
        <g:condition>new</g:condition>
        <g:brand>Brand Name</g:brand>
        <payment_accepted>cash,check,invoice,amex,discover,mastercard,
visa,googlecheckout</payment_accepted>
        <g:payment_notes>Google Checkout accepted</g:payment_notes>
    </entry>
....

And my code to extract this data is like this:

Dim allItems As New List(Of CartItem)
        Dim productXML As XDocument = XDocument.Load( _
Current.Server.MapPath("/App_Data/products.xml"))


    Dim productsDoc = System.Xml.Linq.XDocument.Parse(productXML.ToString())
    Dim products = From entry In productsDoc...<entry> Select entry

    For Each entry In products
        Dim product As New CartItem
        Dim nameAndOptions() As String = Split(entry.<title>.Value, " - ")
        product.ProductName = nameAndOptions(0)
        If nameAndOptions.Length = 2 Then
            product.[Option] = nameAndOptions(1)
        End If
        product.Price = entry.<g:price>.Value 'problem here!'
        product._productid = entry.<id>.Value
        product._permalink = entry.<link>.Value
        allItems.Add(product)
    Next

    Return allItems

A blue squiggly line appears in VS08 under the “g” in “g:price” with the error, “xml namespace prefix ‘g’ is not defined”. How do I fix this? Or is this just a bad idea and I should go back to maintaining two separate files?

Thank you!

  • 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-05-12T00:07:01+00:00Added an answer on May 12, 2026 at 12:07 am

    Try adding the following line to the top of your file:

    Imports <xmlns:g="http://base.google.com/ns/1.0">
    

    (I’ve never done VB 2008, so the syntax may be off)

    EDIT: See here.

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

Sidebar

Ask A Question

Stats

  • Questions 175k
  • Answers 176k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer you can create a function that will 'SpellCheck' for a… May 12, 2026 at 3:10 pm
  • Editorial Team
    Editorial Team added an answer (Please note: I've completely changed my answer based upon clarification… May 12, 2026 at 3:10 pm
  • Editorial Team
    Editorial Team added an answer Eclipse 3.4 can consume a lot more memory than the… May 12, 2026 at 3:10 pm

Related Questions

My customer doesn't want a database but would prefer to update their data in
I'm evaluating Microsoft Team Foundation Server for my customer, who currently uses Visual SourceSafe
I had a peculiar problem yesterday. A customer put one of my Delphi apps
My development under VS2008 Team Suite SP1 with SQL Sever 2005 Express SP3. One
In my current application I have a form that requires the user to enter

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.