Solved

Trouble pulling xml files from database and validating

Posted on 2014-12-17
16
170 Views
Last Modified: 2014-12-24
Hey there,

We use a process called ProductFeed or PostPurchaseFeed for pulling data from a possible IBM server and I'm trying to figure out where the data lives and how to run and validate the correct data.  This will ultimately be used for marketing (surveys) on our website.

When uploaded, it lives on the BazaarVoice FTP server where our uploaded data is stored :  ftp://mydata.com.

 XML files are run through their Corefilling xml schema “validator”.


This seems to have stopped working in September and now the marketing dept wants it back on line.

I have just inherited this job so any help deciphering this would be great.

Thanks,

Metalfubar
0
Comment
Question by:metalfubar
  • 9
  • 7
16 Comments
 
LVL 61

Expert Comment

by:gheist
Comment Utility
What generates wrong XML? I doubt any of components mentioned.
0
 

Author Comment

by:metalfubar
Comment Utility
Gheist,

I'm trying to figure that portion out actually having just inherited this project.  Is their an easy to see a server name or ip source from an old xml pull?  I can post it?  thanks in advance!
0
 

Author Comment

by:metalfubar
Comment Utility
<?xml version="1.0" encoding="UTF-8"?>

<!-- ************ GENERATED CONTENT ************ -->

-<xs:schema elementFormDefault="qualified" targetNamespace="http://www.bazaarvoice.com/xs/PRR/ProductFeed/5.1" xmlns="http://www.bazaarvoice.com/xs/PRR/ProductFeed/5.1" xmlns:xs="http://www.w3.org/2001/XMLSchema">


-<xs:complexType name="AttributesType">


-<xs:sequence>

<xs:element type="AttributeType" name="Attribute" maxOccurs="unbounded" minOccurs="0"/>

</xs:sequence>

</xs:complexType>


-<xs:complexType name="AttributeType">


-<xs:choice>

<xs:element type="OptionalLocalizedStringType" name="Value" maxOccurs="unbounded" minOccurs="1"/>

<xs:element type="OptionalLocalizedUrlType" name="UrlValue" maxOccurs="unbounded" minOccurs="1"/>

</xs:choice>

<xs:attribute type="ExternalIdType" name="id" use="required"/>

</xs:complexType>


-<xs:complexType name="AverageRatingValueType">


-<xs:all>

<xs:element type="xs:float" name="AverageRating"/>

<xs:element type="RatingDimensionType" name="RatingDimension"/>

</xs:all>

<xs:attribute type="ExternalIdType" name="id"/>

</xs:complexType>


-<xs:complexType name="BrandsType">


-<xs:sequence>

<xs:element type="BrandType" name="Brand" maxOccurs="unbounded" minOccurs="0"/>

</xs:sequence>

</xs:complexType>


-<xs:complexType name="BrandType">


-<xs:all>

<xs:element type="xs:string" name="Name" minOccurs="0"/>

<xs:element type="NamesType" name="Names" minOccurs="0"/>

<xs:element type="ExternalIdType" name="ExternalId" minOccurs="0"/>

<xs:element type="AttributesType" name="Attributes" minOccurs="0"/>

</xs:all>

<xs:attribute type="xs:boolean" name="removed" use="optional" default="false"/>

<xs:attribute type="xs:boolean" name="disabled" default="false"/>

</xs:complexType>


-<xs:complexType name="CategoriesType">


-<xs:sequence>

<xs:element type="CategoryType" name="Category" maxOccurs="unbounded" minOccurs="0"/>

</xs:sequence>

</xs:complexType>


-<xs:complexType name="CategoryPageUrlsType">


-<xs:sequence>

<xs:element type="LocalizedUrlType" name="CategoryPageUrl" maxOccurs="unbounded" minOccurs="1"/>

</xs:sequence>

</xs:complexType>


-<xs:complexType name="CategoryQAPageUrlsType">


-<xs:sequence>

<xs:element type="LocalizedUrlType" name="CategoryQAPageUrl" maxOccurs="unbounded" minOccurs="1"/>

</xs:sequence>

</xs:complexType>


-<xs:complexType name="CategoryStoriesPageUrlsType">


-<xs:sequence>

<xs:element type="LocalizedUrlType" name="CategoryStoriesPageUrl" maxOccurs="unbounded" minOccurs="1"/>

</xs:sequence>

</xs:complexType>


-<xs:complexType name="CategoryType">


-<xs:all>

<xs:element type="ExternalIdType" name="ExternalId" minOccurs="0"/>

<xs:element type="ExternalIdType" name="ParentExternalId" minOccurs="0"/>

<xs:element type="xs:string" name="Name" minOccurs="0"/>

<xs:element type="NamesType" name="Names" minOccurs="0"/>

<xs:element type="xs:anyURI" name="CategoryPageUrl" minOccurs="0"/>

<xs:element type="CategoryPageUrlsType" name="CategoryPageUrls" minOccurs="0"/>

<xs:element type="xs:anyURI" name="CategoryQAPageUrl" minOccurs="0"/>

<xs:element type="CategoryQAPageUrlsType" name="CategoryQAPageUrls" minOccurs="0"/>

<xs:element type="xs:anyURI" name="CategoryStoriesPageUrl" minOccurs="0"/>

<xs:element type="CategoryStoriesPageUrlsType" name="CategoryStoriesPageUrls" minOccurs="0"/>

<xs:element type="xs:string" name="ReviewsPageTitle" minOccurs="0"/>

<xs:element type="PageTitlesType" name="ReviewsPageTitles" minOccurs="0"/>

<xs:element type="xs:string" name="ReviewsPageMetaDescription" minOccurs="0"/>

<xs:element type="MetaDescriptionsType" name="ReviewsPageMetaDescriptions" minOccurs="0"/>

<xs:element type="xs:anyURI" name="ProductPageUrlPattern" minOccurs="0"/>

<xs:element type="ProductPageUrlPatternsType" name="ProductPageUrlPatterns" minOccurs="0"/>

<xs:element type="AttributesType" name="Attributes" minOccurs="0"/>

<xs:element type="xs:anyURI" name="ImageUrl" minOccurs="0"/>

<xs:element type="LocalizedUrlsType" name="ImageUrls" minOccurs="0"/>

</xs:all>

<xs:attribute type="xs:boolean" name="removed" use="optional" default="false"/>

<xs:attribute type="xs:boolean" name="disabled" default="false"/>

</xs:complexType>


-<xs:complexType name="DescriptionsType">


-<xs:sequence>

<xs:element type="LocalizedStringType" name="Description" maxOccurs="unbounded" minOccurs="1"/>

</xs:sequence>

</xs:complexType>


-<xs:complexType name="EansType">


-<xs:sequence>

<xs:element type="EanType" name="EAN" maxOccurs="unbounded" minOccurs="1"/>

</xs:sequence>

</xs:complexType>


-<xs:complexType name="FeedType">


-<xs:sequence>

<xs:element type="BrandsType" name="Brands" minOccurs="0"/>

<xs:element type="CategoriesType" name="Categories" minOccurs="0"/>

<xs:element type="ProductsType" name="Products" minOccurs="0"/>

</xs:sequence>

<xs:attribute type="xs:string" name="name" use="required"/>

<xs:attribute type="xs:dateTime" name="extractDate" use="required"/>

<xs:attribute type="xs:boolean" name="incremental" use="required"/>

<xs:attribute type="xs:boolean" name="supplemental" use="optional"/>

<xs:attribute type="xs:string" name="generator" use="optional"/>

</xs:complexType>


-<xs:complexType name="LocalizedUrlsType">


-<xs:sequence>

<xs:element type="LocalizedUrlType" name="ImageUrl" maxOccurs="unbounded" minOccurs="1"/>

</xs:sequence>

</xs:complexType>


-<xs:complexType name="IsbnsType">


-<xs:sequence>

<xs:element type="IsbnType" name="ISBN" maxOccurs="unbounded" minOccurs="1"/>

</xs:sequence>

</xs:complexType>


-<xs:complexType name="LocalizedStringType">


-<xs:simpleContent>


-<xs:extension base="xs:string">

<xs:attribute type="LocaleType" name="locale" use="required"/>

</xs:extension>

</xs:simpleContent>

</xs:complexType>


-<xs:complexType name="LocalizedUrlType">


-<xs:simpleContent>


-<xs:extension base="xs:anyURI">

<xs:attribute type="LocaleType" name="locale" use="required"/>

</xs:extension>

</xs:simpleContent>

</xs:complexType>


-<xs:complexType name="ManufacturerPartNumbersType">


-<xs:sequence>

<xs:element type="ProductUniversalIdentifierType" name="ManufacturerPartNumber" maxOccurs="unbounded" minOccurs="1"/>

</xs:sequence>

</xs:complexType>


-<xs:complexType name="MetaDescriptionsType">


-<xs:sequence>

<xs:element type="LocalizedStringType" name="MetaDescription" maxOccurs="unbounded" minOccurs="1"/>

</xs:sequence>

</xs:complexType>


-<xs:complexType name="ModelNumbersType">


-<xs:sequence>

<xs:element type="ProductUniversalIdentifierType" name="ModelNumber" maxOccurs="unbounded" minOccurs="1"/>

</xs:sequence>

</xs:complexType>


-<xs:complexType name="NamesType">


-<xs:sequence>

<xs:element type="LocalizedStringType" name="Name" maxOccurs="unbounded" minOccurs="1"/>

</xs:sequence>

</xs:complexType>


-<xs:complexType name="OptionalLocalizedStringType">


-<xs:simpleContent>


-<xs:extension base="xs:string">

<xs:attribute type="LocaleType" name="locale" use="optional"/>

</xs:extension>

</xs:simpleContent>

</xs:complexType>


-<xs:complexType name="OptionalLocalizedUrlType">


-<xs:simpleContent>


-<xs:extension base="xs:anyURI">

<xs:attribute type="LocaleType" name="locale" use="optional"/>

</xs:extension>

</xs:simpleContent>

</xs:complexType>


-<xs:complexType name="PageTitlesType">


-<xs:sequence>

<xs:element type="LocalizedStringType" name="PageTitle" maxOccurs="unbounded" minOccurs="1"/>

</xs:sequence>

</xs:complexType>


-<xs:complexType name="ProductPageUrlPatternsType">


-<xs:sequence>

<xs:element type="LocalizedUrlType" name="ProductPageUrlPattern" maxOccurs="unbounded" minOccurs="1"/>

</xs:sequence>

</xs:complexType>


-<xs:complexType name="ProductPageUrlsType">


-<xs:sequence>

<xs:element type="LocalizedUrlType" name="ProductPageUrl" maxOccurs="unbounded" minOccurs="1"/>

</xs:sequence>

</xs:complexType>


-<xs:complexType name="ProductReviewsPageUrlsType">


-<xs:sequence>

<xs:element type="LocalizedUrlType" name="ProductReviewsPageUrl" maxOccurs="unbounded" minOccurs="1"/>

</xs:sequence>

</xs:complexType>


-<xs:complexType name="ProductQAPageUrlsType">


-<xs:sequence>

<xs:element type="LocalizedUrlType" name="ProductQAPageUrl" maxOccurs="unbounded" minOccurs="1"/>

</xs:sequence>

</xs:complexType>


-<xs:complexType name="ProductStoriesPageUrlsType">


-<xs:sequence>

<xs:element type="LocalizedUrlType" name="ProductStoriesPageUrl" maxOccurs="unbounded" minOccurs="1"/>

</xs:sequence>

</xs:complexType>


-<xs:complexType name="ProductType">


-<xs:all>

<xs:element type="ExternalIdType" name="ExternalId"/>

<xs:element type="xs:string" name="Name" minOccurs="0"/>

<xs:element type="NamesType" name="Names" minOccurs="0"/>

<xs:element type="xs:string" name="Description" minOccurs="0"/>

<xs:element type="DescriptionsType" name="Descriptions" minOccurs="0"/>

<xs:element type="ExternalIdType" name="BrandExternalId" minOccurs="0"/>

<xs:element type="BrandType" name="Brand" minOccurs="0"/>

<xs:element type="AttributesType" name="Attributes" minOccurs="0"/>

<xs:element type="ExternalIdType" name="CategoryExternalId" minOccurs="0"/>

<xs:element type="xs:string" name="CategoryName" minOccurs="0"/>


-<xs:element name="CategoryPath" minOccurs="0">


-<xs:complexType>


-<xs:sequence>

<xs:element type="xs:string" name="CategoryName" maxOccurs="unbounded" minOccurs="0"/>

</xs:sequence>

</xs:complexType>

</xs:element>

<xs:element type="xs:anyURI" name="ProductPageUrl" minOccurs="0"/>

<xs:element type="ProductPageUrlsType" name="ProductPageUrls" minOccurs="0"/>

<xs:element type="xs:anyURI" name="ProductReviewsPageUrl" minOccurs="0"/>

<xs:element type="ProductReviewsPageUrlsType" name="ProductReviewsPageUrls" minOccurs="0"/>

<xs:element type="xs:anyURI" name="ProductQAPageUrl" minOccurs="0"/>

<xs:element type="ProductQAPageUrlsType" name="ProductQAPageUrls" minOccurs="0"/>

<xs:element type="xs:anyURI" name="ProductStoriesPageUrl" minOccurs="0"/>

<xs:element type="ProductStoriesPageUrlsType" name="ProductStoriesPageUrls" minOccurs="0"/>

<xs:element type="xs:string" name="ReviewsPageTitle" minOccurs="0"/>

<xs:element type="PageTitlesType" name="ReviewsPageTitles" minOccurs="0"/>

<xs:element type="xs:string" name="ReviewsPageMetaDescription" minOccurs="0"/>

<xs:element type="MetaDescriptionsType" name="ReviewsPageMetaDescriptions" minOccurs="0"/>

<xs:element type="xs:anyURI" name="ImageUrl" minOccurs="0"/>

<xs:element type="LocalizedUrlsType" name="ImageUrls" minOccurs="0"/>

<xs:element type="ModelNumbersType" name="ModelNumbers" minOccurs="0"/>

<xs:element type="ManufacturerPartNumbersType" name="ManufacturerPartNumbers" minOccurs="0"/>

<xs:element type="EansType" name="EANs" minOccurs="0"/>

<xs:element type="UpcsType" name="UPCs" minOccurs="0"/>

<xs:element type="IsbnsType" name="ISBNs" minOccurs="0"/>

</xs:all>

<xs:attribute type="xs:boolean" name="removed" default="false"/>

<xs:attribute type="xs:boolean" name="disabled" default="false"/>

</xs:complexType>


-<xs:complexType name="ProductsType">


-<xs:sequence>

<xs:element type="ProductType" name="Product" maxOccurs="unbounded" minOccurs="0"/>

</xs:sequence>

</xs:complexType>


-<xs:complexType name="RatingDimensionType">


-<xs:all>

<xs:element type="ExternalIdType" name="ExternalId"/>

<xs:element type="xs:int" name="RatingRange"/>

</xs:all>

<xs:attribute type="ExternalIdType" name="id" use="required"/>

<xs:attribute type="xs:boolean" name="selectedValueInDisplayEnabled" default="false"/>

</xs:complexType>


-<xs:complexType name="UpcsType">


-<xs:sequence>

<xs:element type="UpcType" name="UPC" maxOccurs="unbounded" minOccurs="1"/>

</xs:sequence>

</xs:complexType>


-<xs:simpleType name="EanType">


-<xs:restriction base="xs:string">

<xs:pattern value="[0-9]{8}"/>

<xs:pattern value="[0-9]{13}"/>

</xs:restriction>

</xs:simpleType>


-<xs:simpleType name="ExternalIdType">


-<xs:restriction base="xs:string">

<xs:pattern value="[^/]+"/>

</xs:restriction>

</xs:simpleType>


-<xs:simpleType name="IsbnType">


-<xs:restriction base="xs:string">

<xs:pattern value="[0-9]{8,12}[0-9X]"/>

</xs:restriction>

</xs:simpleType>


-<xs:simpleType name="LocaleType">


-<xs:restriction base="xs:string">

<xs:pattern value="[a-z]{2}(_[A-Z]{2}(_[0-9a-zA-Z_]+)?)?"/>

</xs:restriction>

</xs:simpleType>


-<xs:simpleType name="NonNegativeInt">


-<xs:restriction base="xs:int">

<xs:minInclusive value="0"/>

</xs:restriction>

</xs:simpleType>


-<xs:simpleType name="NonNegativeLong">


-<xs:restriction base="xs:long">

<xs:minInclusive value="0"/>

</xs:restriction>

</xs:simpleType>


-<xs:simpleType name="PositiveInt">


-<xs:restriction base="xs:int">

<xs:minInclusive value="1"/>

</xs:restriction>

</xs:simpleType>


-<xs:simpleType name="ProductUniversalIdentifierType">


-<xs:restriction base="xs:string">

<xs:pattern value="\S.*"/>

</xs:restriction>

</xs:simpleType>


-<xs:simpleType name="UpcType">


-<xs:restriction base="xs:string">

<xs:pattern value="[0-9]{6}"/>

<xs:pattern value="[0-9]{12}"/>

</xs:restriction>

</xs:simpleType>

<xs:element type="FeedType" name="Feed"/>

</xs:schema>
0
 
LVL 61

Expert Comment

by:gheist
Comment Utility
That minus there does not fit in XML
-<xs:all>
0
 

Author Comment

by:metalfubar
Comment Utility
just that one?
0
 
LVL 61

Expert Comment

by:gheist
Comment Utility
Like thousand of them?
0
 

Author Comment

by:metalfubar
Comment Utility
ok, so remove all minus signs and rerun the validator?
0
 

Author Comment

by:metalfubar
Comment Utility
that worked and I now validated successfully!  Now how can I figure out where my data lives how to recreate the pull? :)
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 61

Expert Comment

by:gheist
Comment Utility
That was what I was asking. You need to fix the problem as early in those xml's life as possible.
xmllint is another validator.
0
 

Author Comment

by:metalfubar
Comment Utility
So is there anything there to indicate where the XML data lives?
0
 
LVL 61

Expert Comment

by:gheist
Comment Utility
I have no idea.
Where do you get the XMLs from?
Can you explicitly verify/fix/verify them before any damage is done?
0
 

Author Comment

by:metalfubar
Comment Utility
no one at the company knows.  so theres no email type header to get additional server info?

once I can figure out where the data lives, then I"ll work with a verify issue.

the one posted verified from june.
0
 
LVL 61

Accepted Solution

by:
gheist earned 500 total points
Comment Utility
The dash-unequal can be fixed quickly
To get rid of it permanently you need to fix that as close to source as you can get.
Notepad++ you know...
0
 

Author Closing Comment

by:metalfubar
Comment Utility
many thx!!
0
 
LVL 61

Expert Comment

by:gheist
Comment Utility
Now check again all "XML"s that fail validation, maybe some small fixup will untangle them too..
0
 

Author Comment

by:metalfubar
Comment Utility
ok.  done and uploaded.  It ended up residing in an old SQL db.  cheers.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

I use more than 1 computer in my office for various reasons. Multiple keyboards and mice take up more than just extra space, they make working a little more complicated. Using one mouse and keyboard for all of my computers makes life easier. This co…
The article will include the best Data Recovery Tools along with their Features, Capabilities, and their Download Links. Hope you’ll enjoy it and will choose the one as required by you.
XMind Plus helps organize all details/aspects of any project from large to small in an orderly and concise manner. If you are working on a complex project, use this micro tutorial to show you how to make a basic flow chart. The software is free when…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now