User Profile

Collapse

Profile Sidebar

Collapse
yingwen
yingwen
Last Activity: Dec 6 '07, 12:48 AM
Joined: Apr 1 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • yingwen
    started a topic How to write using xmlTextWriter
    in XML

    How to write using xmlTextWriter

    I am trying to write xml file containing


    <MemberName>
    <xNL:NameElemen t xNL:ElementType ="Title">Mr. </xNL:NameElement >
    <xNL:NameElemen t xNL:ElementType ="FirstName">Fr eddy</xNL:NameElement >
    <xNL:NameElemen t xNL:ElementType ="LastName">Kru eger</xNL:NameElement >
    </MemberName>

    How can I do it?
    ...
    See more | Go to post

  • How to read second record within XML file by using openxml?

    I have a xml similar like this:

    <Member ID="123">
    <DateBorrowed>1 1-01-2006</DateBorrowed>
    <Book ID="222"
    Title=""ABC">
    <Category> Fiction</Category>
    </Book>
    <Book ID="333"
    Title=""ABu">
    <Category>Child ren</Category>...
    See more | Go to post

  • How to read second record within XML file by using openxml?

    I have a xml similar like this:

    [html]<Member ID="123">
    <DateBorrowed>1 1-01-2006</DateBorrowed>
    <Book ID="222"
    Title="ABC">
    <Category> Fiction</Category>
    </Book>
    <Book ID="333"
    Title="ABu">
    <Category>Child ren</Category>...
    See more | Go to post

  • Cascade 2 strings in stored procedure for MS SQL

    What is the code to cascade two strings

    SET @string1 = 'aa'
    SET @string2 = 'bb'

    How can I get a string 'aabb' in stored procedure in SQL SERVER 2000?

    thanks
    See more | Go to post

  • yingwen
    replied to How to pass xml file to stored Procedure
    in XML
    Thank you for your reply.

    I still have the problem to pass the xml file.

    I knew xml file's path and file name, is there any way I can just pass these information rather than pass the content of the xml file?

    Actually, I have tried to pass the the content of the xml file, but the problem is, in vb.net, I couldn't find any way to read entire file into a string.

    I have tried streamreader,...
    See more | Go to post

    Leave a comment:


  • yingwen
    replied to Pass XML file to SQL stored procedure
    Thank you very much for your reply.


    I have tried streamreader, xmldocument, xmlreader, but they only read the text part of xml.

    E.g. for a simple xml file:

    <Root>
    <book>title1</book>
    </Root>

    The output is only "title1", but I want the whole thing.

    The problem is how can I read (more complicated than above) entire...
    See more | Go to post

    Leave a comment:


  • yingwen
    replied to How to convert xml file into a xml string
    in .NET
    Thank you for your reply.

    The serialization seems too complicated as I have to write a class for each xml file.

    I just like to read a xml file to a string, the string must include markups and text.

    I have tried streamreader, xmldocument, xmlreader, but they only read the text part of xml.

    E.g. for a simple xml file:

    <Root>
    <book>title1</book>...
    See more | Go to post

    Leave a comment:


  • yingwen
    replied to How to convert xml file into a xml string
    in XML
    Thank you for your reply.

    I have tried

    Dim xmldoc As XmlDocument = New XmlDocument()
    'doc.Load(docum ent2)
    xmldoc.LoadXml( "<root>" & _
    "<elem>some text<child/>more text</elem>" & _
    "</root>")
    Dim elem As XmlNode = xmldoc.Document Element.FirstCh ild
    ...
    See more | Go to post

    Leave a comment:


  • yingwen
    started a topic How to convert xml file into a xml string
    in .NET

    How to convert xml file into a xml string

    How can I turn a XML file into a xml string.

    I have tried streamreader, xmltextreader, the output results only give me the text() part of xml file(all xml tags are not included).

    In other words How can I convert xml file(with known path and file name) into
    Dim strXML AS string =
    "<?xml version="1.0"?> <Registration
    xmlns="NZL:govt :IRD:KiwiSaver: B2BInterfaces:R egisterMembe...
    See more | Go to post

  • yingwen
    started a topic How to convert xml file into a xml string
    in XML

    How to convert xml file into a xml string

    How can I read a XML file into a xml string.

    I have tried streamreader, xmltextreader, the out put results only give me the text() part of xml file(all xml tags are not included in the output).

    In other words How can I convert xml file(file path and name) into
    A string =
    "<?xml version="1.0"?> <Registration
    xmlns="NZL:govt :IRD:KiwiSaver: B2BInterfaces:R egisterMembe r:v1.0"...
    See more | Go to post

  • yingwen
    replied to Pass XML file to SQL stored procedure
    Thank you very much for your quick responses.

    I have another problem here. How can I turn a XML file into a xml string.

    I have tried streamreader, xmltextreader, the out put results only give me the text() part of xml file(all xml tags are not included).

    In other words How can I convert xml file into
    A string =
    "<?xml version="1.0"?> <Registration
    xmlns="NZL:govt :IRD:KiwiSaver: B2BInterfaces:R egisterMember:v 1.0"...
    See more | Go to post

    Leave a comment:


  • yingwen
    replied to Pass XML file to SQL stored procedure
    I am using SQL Server 2000...
    See more | Go to post

    Leave a comment:


  • yingwen
    replied to Pass XML file to SQL stored procedure
    It works fine in following code:

    CREATE PROCEDURE InsertXML AS
    DECLARE @iTree int
    DECLARE @xmlFile varchar(2000)
    SET @xmlFile='<?xml version="1.0" ?>
    <Registration

    </Registration>'

    --Create an internal representation of the XML document.
    EXEC sp_xml_prepared ocument @iTree OUTPUT, @xmlFile,
    '<root xmlns:n="NZL:go vt:IRD:KiwiSave r:B2BInterfaces :RegisterMember :v1.0"...
    See more | Go to post

    Leave a comment:


  • yingwen
    started a topic Pass XML file to SQL stored procedure

    Pass XML file to SQL stored procedure

    I Wrote a stored procedure in SQL Server:

    CREATE PROCEDURE InsertXML2 @xmlFile varchar(2000) AS
    DECLARE @iTree int
    SELECT *
    FROM OPENXML (@iTree, 'n:Registration/nefaultEnrolmen t',3)
    WITH (
    ....
    )
    EXEC sp_xml_removedo cument @iTree
    GO

    How can I pass the XML file to this stored Procedure in VB.NET?

    Thanks a lot
    See more | Go to post

  • I have found out the answer by myself. Thanks.

    Just use

    AddressLine1 varchar(30) 'child::n:Membe rAddress/xAL:FreeTextAdd ress/xAL:AddressLine[position() = 1]',
    AddressLine2 varchar(30) 'child::n:Membe rAddress/xAL:FreeTextAdd ress/xAL:AddressLine[position() = 2]',
    See more | Go to post

    Leave a comment:


  • yingwen
    started a topic How to pass xml file to stored Procedure
    in XML

    How to pass xml file to stored Procedure

    I Wrote a stored procedure in SQL Server:

    CREATE PROCEDURE InsertXML2 @xmlFile varchar(2000) AS
    DECLARE @iTree int
    SELECT *
    FROM OPENXML (@iTree, 'n:Registration/n:DefaultEnrolm ent',3)
    WITH (
    ....
    )
    EXEC sp_xml_removedo cument @iTree
    GO

    How can I pass the XML file to this stored Procedure in VB.NET?

    Thanks a lot
    See more | Go to post

  • How to use XPath to read identical elements with different Text Values

    Hi,

    I have a XML, which I don't have any choice to modify the structure of it.


    <MemberAddres s>
    <xAL:FreeTextAd dress>
    <xAL:AddressLin e>123 Street Name</xAL:AddressLine >
    <xAL:AddressLin e>Suburb, City</xAL:AddressLine >
    </xAL:FreeTextAdd ress>
    <xAL:Country>
    <xAL:Name>New...
    See more | Go to post
No activity results to display
Show More
Working...