XML ¶Á
StringBuilder output = new
StringBuilder();
String xmlString =
@"<bookstore>
<book genre='novel' ISBN='10-861003-324'>
<title>The Handmaid's Tale</title>
<price>19.95</price>
</book>
<book genre='novel' ISBN='1-861001-57-5'>
<title>Pride And Prejudice</title>
<price>24.95</price>
</book>
</bookstore>";
// Load the file and ignore all white space.
XmlReaderSettings settings = new
XmlReaderSettings();
settings.IgnoreWhitespace = true
;
using
(XmlReader reader = XmlReader.Create(new
StringReader(xmlString), settings))
{
// Move the reader to the second book node.
reader.MoveToContent();
reader.ReadToDescendant("book"
);
reader.Skip();
//Skip the first book.
// Parse the file starting with the second book node.
do
{
switch
(reader.NodeType)
{
case
XmlNodeType.Element:
output.AppendLine("<"
+ reader.Name);
while
(reader.MoveToNextAttribute())
{
output.AppendLine(" "
+ reader.Name + "="
+ reader.Value);
}
output.AppendLine(">"
);
break
;
case
XmlNodeType.Text:
output.AppendLine(reader.Value);
break
;
case
XmlNodeType.EndElement:
output.AppendLine("</"
+ reader.Name + ">"
);
break
;
}
}
while
(reader.Read());
}
OutputTextBlock.Text = output.ToString();
XMLÊÇÄ¿Ç°×î³£ÓõÄͨÓÃÊý¾Ý´«ÊäÓë´¦Àí½Ó¿ÚÀàÐÍ¡£±¾ÎĽéÉÜÈçºÎÓÃC#.NET¶ÁдXMLÎĵµ×ÊÁÏ¡£
<?xml version="1.0" encoding="utf-8"?>
Ïà¹ØÎĵµ£º
Caused by: java.sql.SQLException: ORA-00918: column ambiguously defined
Caused by: com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in com/ibatis/jpetstore/persistence/sqlmapdao/sql/Item.xml.
--- The error occurred while applying a parameter map.&nbs ......
»ñÈ¡Spring¿ò¼Ü¹ÜÀíµÄÀàʵÀýµÄ·½·¨ÓжàÖÖ,ÈçÏ£º
·½·¨Ò»£ºÔÚ³õʼ»¯Ê±±£´æApplicationContext¶ÔÏó
´úÂ룺
ApplicationContext ac = new FileSystemXmlApplicationContext("applicationContext.xml");
ac.getBean("beanId");
˵Ã÷£º
ÕâÖÖ·½Ê½ÊÊÓÃÓÚ²ÉÓÃSpring¿ò¼ÜµÄ¶ÀÁ¢Ó¦ÓóÌÐò£¬ÐèÒª³ÌÐòͨ¹ýÅäÖÃÎļþÊÖ¹¤³õʼ»¯ ......
var createXML = function (str) {
if (typeof DOMParser !== "undefined") {
return (new DOMParser()).parsefromString(str, "application/xml");
}else if (typeof ActiveXObject != "undefined") {
if (typeof arguments.callee.activeXString !== "string" ......
¡¡¡¡inkfishÔ´´£¬ÇëÎðÉÌÒµÐÔÖÊתÔØ£¬×ªÔØÇë×¢Ã÷À´Ô´£¨http://blog.csdn.net/inkfish
£©¡£
¡¡¡¡PropertySet£¨À´Ô´£ºhttp://blog.csdn.net/inkfish£©
ÊÇÓÉopensymphony×éÖ¯¿ª·¢µÄµÄÒ»¸ö¿ªÔ´ÏîÄ¿£¬µ«ÊÇÄǸöÏîÄ¿ÎĵµÉÙ£¬³¤Ê±¼äûÓиüУ¬¹Ù·½Îĵµ´íÎóÆæ¶à£¬ËùÒÔÏÖÔÚÔÚÏîÄ¿ÖÐʹÓò¢²»¹ã·º¡£µ«Õâ²¢²»·Á°PropertySet³ÉΪһ¸öÓ ......