Home Page › Forums › BizTalk 2004 – BizTalk 2010 › How to store xml file into database
- This topic has 1 reply, 1 voice, and was last updated 9 years, 1 month ago by
community-content.
-
AuthorPosts
-
-
July 20, 2006 at 12:05 PM #14043
I want to store an xml file into database.
I have created a message and assign it to a stored procedures input parameter.
the sample code is in message assignment isvardoc = POMessage;// vardoc-xmlDocType variable..
and Pomessage is schema typerawstring = varDoc.OuterXml(); //rawstring is string variable
OutDoc = \”<Xsd attrb=rawString>\” //Outdoc is xmlDocType variable.
ProcedureInParameter = OutDoc.
////———-
Here I get an Exception as‘<‘ hexadecimal value 0x3c is an invalid attribute charactor.
Exception type :XmlException
Source: System.Xml
TargetSite : Boolean.scanLiteral()Can anyone sort this out…
-
July 20, 2006 at 3:05 PM #14044
I want to store an xml file into database.
I have created a message and assign it to a stored procedures input parameter.
the sample code is in message assignment isvardoc = POMessage;// vardoc-xmlDocType variable..
and Pomessage is schema typerawstring = varDoc.OuterXml(); //rawstring is string variable
OutDoc = \”<Xsd attrb=rawString>\” //Outdoc is xmlDocType variable.
ProcedureInParameter = OutDoc.
////———-
Here I get an Exception as‘<‘ hexadecimal value 0x3c is an invalid attribute charactor.
Exception type :XmlException
Source: System.Xml
TargetSite : Boolean.scanLiteral()Can anyone sort this out
1. First use an Ascii chart to find out what is 0x3c.
http://www.lookuptables.com/ – shows it is the less-than < sign.2. I’m not sure why you are using the variable OutDoc.
Is OutDoc the name of your message?
I don’t understand the right side of your equal sign on the OutDoc statement at all. You don’t concatenate in \”rawString\” – you just have it as a literal. I don’t know why you have the xsd and attrb either.Seems like you need something like this:
mySQLMessage.xmlString = rawstring;where mySqlMessage is the message you are constructing, and xmlString is a distinguished field that will pass the xml string to the stored. proc.
Neal
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.