Jump to content

CMCollins

Members
  • Posts

    11
  • Joined

  • Last visited

CMCollins's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. It's working !!! (Jumping for Joy!!!) I now have a table with 1400+ records in it. I had to do a little cleanup. For example I had "item" in the xsd, but "Item" in the xml. I also had a couple of my fields in the xsd in a different order than they were in the xml. Once all that was fixed it worked. The only thing I wish I could do now is get more than one review to automatically be imported in Excel. I've been reading about "repeating elements", but am not sure if that applies to what I'm doing. For example the xml download I use has the following review data for one product. <Author>J. Mitchell</Author> <RTitle>Excelent product</RTitle> <RRating>5</RRating> <Content>This dome is exactly what I needed .</Content> <Author>Gregory Blount</Author> <RTitle>Hydrofarm 7 inch vented dome</RTitle> <RRating>5</RRating> <Content>I found this dome to be superior quality compared to some of the specialty greenhouse offerings.</Content> I was hoping they would load in as they do from my other scraper that would do: Author1 RTitle1 RRating1 Content1 Author2 RTitle2 RRating2 Content2 Thanks again for all your help!
  2. I sort of have good news. After correcting the schema ref element, the test files I have been using now go through the validator without error. At first I got this message: s4s-elt-must-match.1: The content of 'product' must match (annotation?, (simpleType | complexType)?, (unique | key | keyref)*)). A problem was found starting at: complextype. I was able to find info that I needed to change complextype to complexType and that fixed that error. Thanks to dsonesuk for sticking with me on this and getting me error free. Now my problem is that if I use an xml with more than one product in it, I get the error message in Excel "Only one top level element is allowed in an XML document" which is what started my post thread in the first place. It's hanging up on the line that has the start tag of my second product. The multi-product xml works in the XML validator, but not in Excel. An xml with only one product also comes in properly in Excel now, which it didn't before.
  3. BTW: There doesn't seem to be any problem with the xml finding the xsd. That's working fine.
  4. I'm still getting this message in the xsd: The prefix "xsd" for element "xsd:element" is not bound. referring to the second line here: 1 <?xml version="1.0"?> 2 <xsd:element name="product"> What does "is not bound" mean? Thanks.
  5. Getting there.  Thanks dsonesuk for the two lines at the beginning of the xml.   This is the error I'm getting on the xml at the moment: Element type "xsd:noNamespaceSchemaLocation" must be followed by either attribute specifications, ">" or "/>".   Here is the current xml, and the xsd follows:   <?xml version="1.0" encoding="UTF-8" standalone="yes"?><xsd:noNamespaceSchemaLocation="file:C:UsersCherylMy Documentsxsd_090114.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance"><product>  <asin>B003Y3E55G</asin>  <brand>Hydrofarm</brand>  <title>Hydrofarm CK64081 7-Inch Vented Dome</title>  <category>Patio, Lawn &amp; Garden</category>  <description>Hydrofarm ck64081 7-inch vented humidity dome</description>  <wordcount>6</wordcount>  <rating>3.7</rating>  <review>87</review>  <listprice>0</listprice>  <price>12.88</price>  <discount>0%</discount>  <shipping>0</shipping>  <totalprice>0</totalprice>  <parentasin>B003Y3E55G</parentasin>  <available>True</available>  <fulfilled>False</fulfilled>  <thumbnail>http://ecx.images-am...VIL._AA160_.jpg</thumbnail>  <url>http://www.amazon.co...#38;amp;sr=1-24</url>  <imageurl>http://ecx.images-am...VIL._SS500_.jpg</imageurl>  <salesrank>2917</salesrank></product>   xsd content:   <?xml version="1.0"?><xsd:element name="product"><xsd:complextype><xsd:sequence>  <xsd:element name="asin" type="xsd:string"/>    <xsd:element name="brand" type="xsd:string"/>    <xsd:element name="title" type="xsd:string"/>    <xsd:element name="category" type="xsd:string"/>  <xsd:element name="description" type="xsd:string"/>  <xsd:element name="wordcount" type="xsd:string"/>  <xsd:element name="rating" type="xsd:string"/>  <xsd:element name="review" type="xsd:string"/>  <xsd:element name="listprice" type="xsd:string"/>  <xsd:element name="price" type="xsd:string"/>  <xsd:element name="discount" type="xsd:string"/>  <xsd:element name="shipping" type="xsd:string"/>  <xsd:element name="totalprice" type="xsd:string"/>  <xsd:element name="parentasin" type="xsd:string"/>  <xsd:element name="available" type="xsd:string"/>  <xsd:element name="fulfilled" type="xsd:string"/>  <xsd:element name="thumbnail" type="xsd:string"/>  <xsd:element name="url" type="xsd:string"/>  <xsd:element name="imageurl" type="xsd:string"/>  <xsd:element name="salesrank" type="xsd:string"/></xsd:sequence></xsd:complextype></xsd:element></xsd:schema>
  6. I found the other capitals in the tags and removed them, and get the same messages. I've been trying to use an internal dtd because I haven't found any good directions for how to create and use an external one. Which lines is it supposed to contain, and where is it stored, just in the same folder as the xml? What software do you use to create one?
  7. I have changed all the tags I created to lower case and I took out the 2nd Description tag.  I'm still getting these error messages:   XMLspy: Character 'p' following the text '<' does not fulfill production 'Misc'.   Excel: Only one top level element is allowed in an xml document   XMLValidation The markup in the document following the root element must be well-formed.   http://www.freeformatter.com/xml-validator-xsd.html The Markup In The Document Following The Root Element Must Be Well-formed.   The latest version is below:   <?xml version="1.0"?><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"><xsd:include schemaLocation="amzn-base.xsd"/><xsd:element name="product"><xsd:complexType><xsd:sequence>  <xsd:element name="asin" type="xsd:string"/>    <xsd:element name="brand" type="xsd:string"/>    <xsd:element name="title" type="xsd:string"/>    <xsd:element name="category" type="xsd:string"/>  <xsd:element name="description" type="xsd:string"/>  <xsd:element name="wordcount" type="xsd:string"/>  <xsd:element name="rating" type="xsd:string"/>  <xsd:element name="review" type="xsd:string"/>  <xsd:element name="listprice" type="xsd:string"/>  <xsd:element name="price" type="xsd:string"/>  <xsd:element name="discount" type="xsd:string"/>  <xsd:element name="shipping" type="xsd:string"/>  <xsd:element name="totalprice" type="xsd:string"/>  <xsd:element name="parentasin" type="xsd:string"/>  <xsd:element name="available" type="xsd:string"/>  <xsd:element name="fulfilled" type="xsd:string"/>  <xsd:element name="thumbnail" type="xsd:string"/>  <xsd:element name="url" type="xsd:string"/>  <xsd:element name="imageurl" type="xsd:string"/>  <xsd:element name="salesrank" type="xsd:string"/></xsd:sequence></xsd:complexType></xsd:element></xsd:schema><Product>  <asin>B003Y3E55G</asin>  <brand>Hydrofarm</brand>  <title>Hydrofarm CK64081 7-Inch Vented Dome</title>  <category>Patio, Lawn &amp; Garden</Category>  <description>Hydrofarm ck64081 7-inch vented humidity dome</description>  <wordcount>6</wordcount>  <rating>3.7</rating>  <review>87</review>  <listprice>0</listprice>  <price>12.88</price>  <discount>0%</discount>  <shipping>0</shipping>  <totalprice>0</totalprice>  <parentasin>B003Y3E55G</parentasin>  <available>True</available>  <fulfilled>False</fulfilled>  <thumbnail>http://ecx.images-am...VIL._AA160_.jpg</thumbnail>  <url>http://www.amazon.co...#38;amp;sr=1-24</URL>  <imageurl>http://ecx.images-am...VIL._SS500_.jpg</imageurl>  <salesrank>2917</salesrank></product> 
  8. I took out these two lines: <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xsd:include schemaLocation="amzn-base.xsd"/> and </xsd:schema> Now XMLValidation.com says: The prefix "xsd" for element "xsd:element" is not bound. XMLSpy still says: Character 'P' following the text '<' does not fulfill production 'Misc'. And when I try to open it in Excel I get: Strict Parse Error
  9. When I try to open it in excel I get XML document must have a top level element XMLSpy says Character 'P' following the text '<' does not fulfill production 'Misc'. http://www.xmlvalidation.com/ says 31: 2 The markup in the document following the root element must be well-formed.
  10. That doesn't seem to help. I've tried using Find/Replace to make them all upper case and all lower case, and no luck yet. I appreciate your efforts tho.
  11. I've been staring at this for hours and searching forums for an answer. I have also gotten this message from another validator: "Character 'P' following the text '<' does not fulfill production 'Misc', which highlights the first start tag of <Product>. Could anyone recommend a solution? As far as I can tell I only have one root element, but maybe I'm missing something. <?xml version="1.0"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xsd:include schemaLocation="amzn-base.xsd"/> <xsd:element name="product"> <xsd:complexType> <xsd:sequence> <xsd:element name="asin" type="xsd:string"/> <xsd:element name="brand" type="xsd:string"/> <xsd:element name="title" type="xsd:string"/> <xsd:element name="category" type="xsd:string"/> <xsd:element name="description" type="xsd:string"/> <xsd:element name="wordcount" type="xsd:string"/> <xsd:element name="rating" type="xsd:string"/> <xsd:element name="review" type="xsd:string"/> <xsd:element name="listprice" type="xsd:string"/> <xsd:element name="price" type="xsd:string"/> <xsd:element name="discount" type="xsd:string"/> <xsd:element name="shipping" type="xsd:string"/> <xsd:element name="totalprice" type="xsd:string"/> <xsd:element name="parentasin" type="xsd:string"/> <xsd:element name="available" type="xsd:string"/> <xsd:element name="fulfilled" type="xsd:string"/> <xsd:element name="thumbnail" type="xsd:string"/> <xsd:element name="url" type="xsd:string"/> <xsd:element name="imageurl" type="xsd:string"/> <xsd:element name="salesrank" type="xsd:string"/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema> <Product> <ASIN>B003Y3E55G</ASIN> <Brand>Hydrofarm</Brand> <Title>Hydrofarm CK64081 7-Inch Vented Dome</Title> <Category>Patio, Lawn & Garden</Category> <Description>Hydrofarm ck64081 7-inch vented humidity dome</Description> <WordCount>6</WordCount> <Rating>3.7</Rating> <Review>87</Review> <ListPrice>0</ListPrice> <Price>12.88</Price> <Discount>0%</Discount> <Shipping>0</Shipping> <TotalPrice>0</TotalPrice> <ParentASIN>B003Y3E55G</ParentASIN> <Available>True</Available> <Fulfilled>False</Fulfilled> <Thumbnail>http://ecx.images-amazon.com/images/I/21cla739VIL._AA160_.jpg</Thumbnail> <URL>http://www.amazon.com/Hydrofarm-CK64081-7-Inch-Vented-Dome/dp/B003Y3E55G/ref=sr_1_24?s=lawn-garden&amp;ie=UTF8&amp;qid=1409210462&amp;sr=1-24</URL> <ImageURL>http://ecx.images-amazon.com/images/I/21cla739VIL._SS500_.jpg</ImageURL> <Description>Vented humidity dome * Easy dial vents for precise control of temperature and humidity * Durable, high-grade flexible plastic resists cracking * Designed to last longer * Great for taller cuttings * 7-inch dome gives extra height for your taller cuttings * Adjustable vents allow for perfect humidity and temperature control</Description> <SalesRank>2917</SalesRank> </Product>
×
×
  • Create New...